diff --git a/best-practices/troubleshooting/common_issues.md b/best-practices/troubleshooting/common_issues.md index d8e001051..b6ad59514 100644 --- a/best-practices/troubleshooting/common_issues.md +++ b/best-practices/troubleshooting/common_issues.md @@ -9,7 +9,7 @@ First, check your Deployment or Pod YAML file, and check that you have the follo Sample deployment: -
+```yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -36,7 +36,7 @@ spec:
         ports:
         - containerPort: 3000
         imagePullPolicy: Always
-
+``` If your pod spec template is annotated correctly and you still don't see the sidecar injected, make sure Dapr was deployed to the cluster before your deployment or pod were deployed. diff --git a/howto/authorization-with-oauth/README.md b/howto/authorization-with-oauth/README.md index 850376600..e92a73b98 100644 --- a/howto/authorization-with-oauth/README.md +++ b/howto/authorization-with-oauth/README.md @@ -40,6 +40,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: oauth2 + namespace: default spec: type: middleware.http.oauth2 metadata: @@ -68,6 +69,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: pipeline + namespace: default spec: httpPipeline: handlers: diff --git a/howto/autoscale-with-keda/README.md b/howto/autoscale-with-keda/README.md index 7fc474623..ccf5705c7 100644 --- a/howto/autoscale-with-keda/README.md +++ b/howto/autoscale-with-keda/README.md @@ -29,6 +29,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: kafkaevent + namespace: default spec: type: bindings.kafka metadata: diff --git a/howto/components-scopes/README.md b/howto/components-scopes/README.md index 4396cc294..18ad026a3 100644 --- a/howto/components-scopes/README.md +++ b/howto/components-scopes/README.md @@ -17,7 +17,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore - namespace: production + namespace: default spec: type: state.redis metadata: @@ -65,7 +65,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore - namespace: production + namespace: default spec: type: state.redis metadata: diff --git a/howto/configure-mtls/README.md b/howto/configure-mtls/README.md index 1a9d913b4..d659690cd 100644 --- a/howto/configure-mtls/README.md +++ b/howto/configure-mtls/README.md @@ -20,6 +20,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: default + namespace: default spec: mtls: enabled: "true" @@ -169,6 +170,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: default + namespace: default spec: mtls: enabled: "true" @@ -195,6 +197,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: default + namespace: default spec: mtls: enabled: "true" diff --git a/howto/configure-redis/README.md b/howto/configure-redis/README.md index 6662ad5b6..f4bf3ab05 100644 --- a/howto/configure-redis/README.md +++ b/howto/configure-redis/README.md @@ -77,6 +77,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: @@ -95,6 +96,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: diff --git a/howto/consume-topic/README.md b/howto/consume-topic/README.md index eb1105979..91f74312c 100644 --- a/howto/consume-topic/README.md +++ b/howto/consume-topic/README.md @@ -13,11 +13,12 @@ For this guide, we'll use Redis Streams, which is also installed by default on a *Note: When running Dapr locally, a pub/sub component YAML will automatically be created if it doesn't exist in a directory called `components` in your current working directory.* -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: diff --git a/howto/control-concurrency/README.md b/howto/control-concurrency/README.md index f9ac57818..4b0df145a 100644 --- a/howto/control-concurrency/README.md +++ b/howto/control-concurrency/README.md @@ -14,11 +14,12 @@ Using Dapr, there are no code changes needed to an app. To set max-concurrency in Kubernetes, add the following annotation to your pod: -
+```yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: nodesubscriber
+  namespace: default
   labels:
     app: nodesubscriber
 spec:
@@ -36,7 +37,7 @@ spec:
         dapr.io/port: "3000"
         dapr.io/max-concurrency: "1"
 ...
-
+``` ### Setting max-concurrency using the Dapr CLI diff --git a/howto/create-grpc-app/README.md b/howto/create-grpc-app/README.md index 77fe5fd99..a2f206c3f 100644 --- a/howto/create-grpc-app/README.md +++ b/howto/create-grpc-app/README.md @@ -16,11 +16,12 @@ To do that, the app simply needs to host a gRPC server and implement the [Dapr c On Kubernetes, set the following annotations in your deployment YAML: -
+```yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: myapp
+  namespace: default
   labels:
     app: myapp
 spec:
@@ -38,7 +39,7 @@ spec:
         dapr.io/protocol: "grpc"
         dapr.io/port: "5005"
 ...
-
+``` This tells Dapr to communicate with your app via gRPC over port `5005`. diff --git a/howto/diagnose-with-tracing/azure-monitor.md b/howto/diagnose-with-tracing/azure-monitor.md index dd304be3a..d1a7b607f 100644 --- a/howto/diagnose-with-tracing/azure-monitor.md +++ b/howto/diagnose-with-tracing/azure-monitor.md @@ -47,6 +47,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: native + namespace: default spec: type: exporters.native metadata: @@ -63,6 +64,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: tracing + namespace: default spec: tracing: samplingRate: "1" @@ -101,6 +103,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: native + namespace: default spec: type: exporters.native metadata: @@ -117,6 +120,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: tracing + namespace: default spec: tracing: samplingRate: "1" diff --git a/howto/diagnose-with-tracing/localforwarder/appinsight-tracing.yaml b/howto/diagnose-with-tracing/localforwarder/appinsight-tracing.yaml index 764c8a34a..e5a4ab6fd 100644 --- a/howto/diagnose-with-tracing/localforwarder/appinsight-tracing.yaml +++ b/howto/diagnose-with-tracing/localforwarder/appinsight-tracing.yaml @@ -3,6 +3,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: tracing + namespace: default spec: tracing: enabled: true @@ -13,6 +14,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: native + namespace: default spec: type: exporters.native metadata: diff --git a/howto/diagnose-with-tracing/localforwarder/dapr-localforwarder.yaml b/howto/diagnose-with-tracing/localforwarder/dapr-localforwarder.yaml index 6109ec10a..ee2796a04 100644 --- a/howto/diagnose-with-tracing/localforwarder/dapr-localforwarder.yaml +++ b/howto/diagnose-with-tracing/localforwarder/dapr-localforwarder.yaml @@ -2,6 +2,7 @@ kind: Service apiVersion: v1 metadata: name: dapr-localforwarder + namespace: default labels: app: dapr-localforwarder spec: @@ -17,6 +18,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: dapr-localforwarder + namespace: default labels: app: dapr-localforwarder spec: diff --git a/howto/diagnose-with-tracing/zipkin.md b/howto/diagnose-with-tracing/zipkin.md index d6fdcd007..e592c1d83 100644 --- a/howto/diagnose-with-tracing/zipkin.md +++ b/howto/diagnose-with-tracing/zipkin.md @@ -18,6 +18,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: zipkin + namespace: default spec: type: exporters.zipkin metadata: @@ -34,6 +35,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: tracing + namespace: default spec: tracing: samplingRate: "1" @@ -82,6 +84,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: zipkin + namespace: default spec: type: exporters.zipkin metadata: @@ -98,6 +101,7 @@ apiVersion: dapr.io/v1alpha1 kind: Configuration metadata: name: tracing + namespace: default spec: tracing: samplingRate: "1" diff --git a/howto/invoke-and-discover-services/README.md b/howto/invoke-and-discover-services/README.md index 7e20b3f8d..1288250a3 100644 --- a/howto/invoke-and-discover-services/README.md +++ b/howto/invoke-and-discover-services/README.md @@ -28,11 +28,12 @@ dapr run --app-id cart --app-port 5000 python app.py In Kubernetes, set the `dapr.io/id` annotation on your pod: -
+```yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: python-app
+  namespace: default
   labels:
     app: python-app
 spec:
@@ -49,7 +50,7 @@ spec:
         dapr.io/id: "cart"
         dapr.io/port: "5000"
 ...
-
+``` ## Invoke a service in code diff --git a/howto/publish-topic/README.md b/howto/publish-topic/README.md index d64ac7db2..65be101f8 100644 --- a/howto/publish-topic/README.md +++ b/howto/publish-topic/README.md @@ -13,11 +13,12 @@ For this guide, we'll use Redis Streams, which is also installed by default on a *Note: When running Dapr locally, a pub/sub component YAML will automatically be created if it doesn't exist in a directory called `components` in your current working directory.* -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: diff --git a/howto/pubsub-namespaces/README.md b/howto/pubsub-namespaces/README.md index 0b746b54a..12a3627f9 100644 --- a/howto/pubsub-namespaces/README.md +++ b/howto/pubsub-namespaces/README.md @@ -31,11 +31,12 @@ Install Redis (master and slave) on `namespace-a`, following [these instructions Now, configure `deploy/redis.yaml`, paying attention to the hostname containing `namespace-a`. -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: diff --git a/howto/pubsub-scopes/README.md b/howto/pubsub-scopes/README.md index 3f6a90391..c2cc85cef 100644 --- a/howto/pubsub-scopes/README.md +++ b/howto/pubsub-scopes/README.md @@ -28,6 +28,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: @@ -71,6 +72,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: @@ -94,6 +96,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: diff --git a/howto/send-events-with-output-bindings/README.md b/howto/send-events-with-output-bindings/README.md index ea06ee07c..565f9b805 100644 --- a/howto/send-events-with-output-bindings/README.md +++ b/howto/send-events-with-output-bindings/README.md @@ -13,11 +13,12 @@ Create the following YAML file, named binding.yaml, and save this to the /compon *Note: When running in Kubernetes, apply this file to your cluster using `kubectl apply -f binding.yaml`* -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: myEvent + namespace: default spec: type: bindings.kafka metadata: diff --git a/howto/setup-monitoring-tools/fluentd-dapr-with-rbac.yaml b/howto/setup-monitoring-tools/fluentd-dapr-with-rbac.yaml index a6ab926c1..d6c06ff5a 100644 --- a/howto/setup-monitoring-tools/fluentd-dapr-with-rbac.yaml +++ b/howto/setup-monitoring-tools/fluentd-dapr-with-rbac.yaml @@ -27,6 +27,7 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: fluentd + namespace: default roleRef: kind: ClusterRole name: fluentd diff --git a/howto/setup-monitoring-tools/setup-azure-monitor.md b/howto/setup-monitoring-tools/setup-azure-monitor.md index f745be436..c4c6c3a3a 100644 --- a/howto/setup-monitoring-tools/setup-azure-monitor.md +++ b/howto/setup-monitoring-tools/setup-azure-monitor.md @@ -74,6 +74,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: pythonapp + namespace: default labels: app: python spec: diff --git a/howto/setup-monitoring-tools/setup-fluentd-es-kibana.md b/howto/setup-monitoring-tools/setup-fluentd-es-kibana.md index 7f6ae246f..2f2420637 100644 --- a/howto/setup-monitoring-tools/setup-fluentd-es-kibana.md +++ b/howto/setup-monitoring-tools/setup-fluentd-es-kibana.md @@ -115,6 +115,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: pythonapp + namespace: default labels: app: python spec: diff --git a/howto/setup-pub-sub-message-broker/README.md b/howto/setup-pub-sub-message-broker/README.md index 5818fffd9..268532523 100644 --- a/howto/setup-pub-sub-message-broker/README.md +++ b/howto/setup-pub-sub-message-broker/README.md @@ -7,11 +7,12 @@ Pub/Sub message buses are extensible and can be found in the [components-contrib A pub/sub in Dapr is described using a `Component` file: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub. metadata: diff --git a/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md b/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md index 14b2c47f4..520b85679 100644 --- a/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md +++ b/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md @@ -8,11 +8,12 @@ The next step is to create a Dapr component for Azure Service Bus. Create the following YAML file named `azuresb.yaml`: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: + namespace: spec: type: pubsub.azure.servicebus metadata: diff --git a/howto/setup-pub-sub-message-broker/setup-gcp.md b/howto/setup-pub-sub-message-broker/setup-gcp.md index a8cb3814d..4d4714e11 100644 --- a/howto/setup-pub-sub-message-broker/setup-gcp.md +++ b/howto/setup-pub-sub-message-broker/setup-gcp.md @@ -8,11 +8,12 @@ The next step is to create a Dapr component for Google Cloud Pub/Sub Create the following YAML file named `messagebus.yaml`: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: + namespace: spec: type: pubsub.gcp.pubsub metadata: diff --git a/howto/setup-pub-sub-message-broker/setup-hazelcast.md b/howto/setup-pub-sub-message-broker/setup-hazelcast.md index bca308fdc..cde13ab52 100644 --- a/howto/setup-pub-sub-message-broker/setup-hazelcast.md +++ b/howto/setup-pub-sub-message-broker/setup-hazelcast.md @@ -20,11 +20,12 @@ The next step is to create a Dapr component for Hazelcast. Create the following YAML file named `hazelcast.yaml`: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: pubsub.hazelcast metadata: diff --git a/howto/setup-pub-sub-message-broker/setup-nats.md b/howto/setup-pub-sub-message-broker/setup-nats.md index c69ec4554..e21353070 100644 --- a/howto/setup-pub-sub-message-broker/setup-nats.md +++ b/howto/setup-pub-sub-message-broker/setup-nats.md @@ -31,11 +31,12 @@ The next step is to create a Dapr component for NATS. Create the following YAML file named `nats.yaml`: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: pubsub.nats metadata: diff --git a/howto/setup-pub-sub-message-broker/setup-rabbitmq.md b/howto/setup-pub-sub-message-broker/setup-rabbitmq.md index b3330d374..f3f97f1ed 100644 --- a/howto/setup-pub-sub-message-broker/setup-rabbitmq.md +++ b/howto/setup-pub-sub-message-broker/setup-rabbitmq.md @@ -33,11 +33,12 @@ The next step is to create a Dapr component for RabbitMQ. Create the following YAML file named `rabbitmq.yaml`: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: pubsub.rabbitmq metadata: diff --git a/howto/setup-pub-sub-message-broker/setup-redis.md b/howto/setup-pub-sub-message-broker/setup-redis.md index 849fb1a15..9c043aef1 100644 --- a/howto/setup-pub-sub-message-broker/setup-redis.md +++ b/howto/setup-pub-sub-message-broker/setup-redis.md @@ -60,6 +60,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: messagebus + namespace: default spec: type: pubsub.redis metadata: diff --git a/howto/setup-secret-store/aws-secret-manager.md b/howto/setup-secret-store/aws-secret-manager.md index db913b3ab..87d42d92a 100644 --- a/howto/setup-secret-store/aws-secret-manager.md +++ b/howto/setup-secret-store/aws-secret-manager.md @@ -13,6 +13,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: awssecretmanager + namespace: default spec: type: secretstores.aws.secretmanager metadata: @@ -44,6 +45,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: diff --git a/howto/setup-secret-store/azure-keyvault-managed-identity.md b/howto/setup-secret-store/azure-keyvault-managed-identity.md index a8df36b92..8999e3cea 100644 --- a/howto/setup-secret-store/azure-keyvault-managed-identity.md +++ b/howto/setup-secret-store/azure-keyvault-managed-identity.md @@ -106,6 +106,7 @@ In Kubernetes mode, you store the certificate for the service principal into the kind: Component metadata: name: azurekeyvault + namespace: default spec: type: secretstores.azure.keyvault metadata: @@ -138,6 +139,7 @@ In Kubernetes mode, you store the certificate for the service principal into the kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: @@ -163,6 +165,7 @@ In Kubernetes mode, you store the certificate for the service principal into the apiVersion: v1 metadata: name: nodeapp + namespace: default labels: app: node spec: @@ -179,6 +182,7 @@ In Kubernetes mode, you store the certificate for the service principal into the kind: Deployment metadata: name: nodeapp + namespace: default labels: app: node spec: diff --git a/howto/setup-secret-store/azure-keyvault.md b/howto/setup-secret-store/azure-keyvault.md index 644d426d3..91ef8d9d5 100644 --- a/howto/setup-secret-store/azure-keyvault.md +++ b/howto/setup-secret-store/azure-keyvault.md @@ -115,6 +115,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: azurekeyvault + namespace: default spec: type: secretstores.azure.keyvault metadata: @@ -143,6 +144,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: @@ -202,6 +204,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: azurekeyvault + namespace: default spec: type: secretstores.azure.keyvault metadata: @@ -241,6 +244,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: diff --git a/howto/setup-secret-store/gcp-secret-manager.md b/howto/setup-secret-store/gcp-secret-manager.md index 7d50982eb..c2172fafe 100644 --- a/howto/setup-secret-store/gcp-secret-manager.md +++ b/howto/setup-secret-store/gcp-secret-manager.md @@ -13,6 +13,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: gcpsecretmanager + namespace: default spec: type: secretstores.gcp.secretmanager metadata: @@ -56,6 +57,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: diff --git a/howto/setup-secret-store/hashicorp-vault.md b/howto/setup-secret-store/hashicorp-vault.md index efbe08491..86e4fa663 100644 --- a/howto/setup-secret-store/hashicorp-vault.md +++ b/howto/setup-secret-store/hashicorp-vault.md @@ -15,6 +15,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: vault + namespace: default spec: type: secretstores.hashicorp.vault metadata: @@ -53,6 +54,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: diff --git a/howto/setup-state-store/README.md b/howto/setup-state-store/README.md index 060116ef2..e9b110af8 100644 --- a/howto/setup-state-store/README.md +++ b/howto/setup-state-store/README.md @@ -7,11 +7,12 @@ State stores are extensible and can be found in the [components-contrib repo](ht A state store in Dapr is described using a `Component` file: -```yml +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state. metadata: diff --git a/howto/setup-state-store/setup-aerospike.md b/howto/setup-state-store/setup-aerospike.md index ad3380303..fa423c6e8 100644 --- a/howto/setup-state-store/setup-aerospike.md +++ b/howto/setup-state-store/setup-aerospike.md @@ -32,11 +32,12 @@ The next step is to create a Dapr component for Aerospike. Create the following YAML file named `aerospike.yaml`: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.Aerospike metadata: diff --git a/howto/setup-state-store/setup-azure-cosmosdb.md b/howto/setup-state-store/setup-azure-cosmosdb.md index 11ce26537..3fb869cb2 100644 --- a/howto/setup-state-store/setup-azure-cosmosdb.md +++ b/howto/setup-state-store/setup-azure-cosmosdb.md @@ -23,7 +23,8 @@ Create the following YAML file named `cosmos.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.azure.cosmosdb metadata: @@ -41,11 +42,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr The following example uses the Kubernetes secret store to retrieve the secrets: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.azure.cosmosdb metadata: diff --git a/howto/setup-state-store/setup-azure-tablestorage.md b/howto/setup-state-store/setup-azure-tablestorage.md index 17027c0d7..454f73130 100644 --- a/howto/setup-state-store/setup-azure-tablestorage.md +++ b/howto/setup-state-store/setup-azure-tablestorage.md @@ -22,7 +22,8 @@ Create the following YAML file named `azuretable.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.azure.tablestorage metadata: @@ -38,11 +39,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr The following example uses the Kubernetes secret store to retrieve the secrets: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.azure.tablestorage metadata: diff --git a/howto/setup-state-store/setup-cassandra.md b/howto/setup-state-store/setup-cassandra.md index 67726c979..abadd02cb 100644 --- a/howto/setup-state-store/setup-cassandra.md +++ b/howto/setup-state-store/setup-cassandra.md @@ -36,7 +36,8 @@ Create the following YAML file named `cassandra.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.cassandra metadata: @@ -62,11 +63,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr The following example uses the Kubernetes secret store to retrieve the username and password: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.cassandra metadata: diff --git a/howto/setup-state-store/setup-cloudstate.md b/howto/setup-state-store/setup-cloudstate.md index 3fba8a05d..6a2ba0a67 100644 --- a/howto/setup-state-store/setup-cloudstate.md +++ b/howto/setup-state-store/setup-cloudstate.md @@ -26,6 +26,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: cloudstate + namespace: default spec: type: state.cloudstate metadata: @@ -61,6 +62,7 @@ kind: Deployment metadata: annotations: name: test-dapr-app + namespace: default labels: app: test-dapr-app spec: @@ -125,6 +127,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: cloudstate-pod-reader + namespace: default rules: - apiGroups: - "" @@ -140,6 +143,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: cloudstate-read-pods-default + namespace: default roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/howto/setup-state-store/setup-consul.md b/howto/setup-state-store/setup-consul.md index 053a44d75..17699ce75 100644 --- a/howto/setup-state-store/setup-consul.md +++ b/howto/setup-state-store/setup-consul.md @@ -35,7 +35,8 @@ Create the following YAML file named `consul.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.consul metadata: @@ -55,11 +56,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr The following example uses the Kubernetes secret store to retrieve the acl token: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.consul metadata: diff --git a/howto/setup-state-store/setup-couchbase.md b/howto/setup-state-store/setup-couchbase.md index f2815614f..1647b3a07 100644 --- a/howto/setup-state-store/setup-couchbase.md +++ b/howto/setup-state-store/setup-couchbase.md @@ -26,11 +26,12 @@ The next step is to create a Dapr component for Couchbase. Create the following YAML file named `couchbase.yaml`: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.couchbase metadata: diff --git a/howto/setup-state-store/setup-etcd.md b/howto/setup-state-store/setup-etcd.md index 5acd9c0b7..51a4e4406 100644 --- a/howto/setup-state-store/setup-etcd.md +++ b/howto/setup-state-store/setup-etcd.md @@ -32,11 +32,12 @@ The next step is to create a Dapr component for etcd. Create the following YAML file named `etcd.yaml`: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.etcd metadata: diff --git a/howto/setup-state-store/setup-firestore.md b/howto/setup-state-store/setup-firestore.md index db525f1e6..3eda9f46d 100644 --- a/howto/setup-state-store/setup-firestore.md +++ b/howto/setup-state-store/setup-firestore.md @@ -16,11 +16,12 @@ The next step is to create a Dapr component for Firestore. Create the following YAML file named `firestore.yaml`: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.gcp.firestore metadata: diff --git a/howto/setup-state-store/setup-hazelcast.md b/howto/setup-state-store/setup-hazelcast.md index aa58f25d5..a25bfe28b 100644 --- a/howto/setup-state-store/setup-hazelcast.md +++ b/howto/setup-state-store/setup-hazelcast.md @@ -20,11 +20,12 @@ The next step is to create a Dapr component for Hazelcast. Create the following YAML file named `hazelcast.yaml`: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.hazelcast metadata: diff --git a/howto/setup-state-store/setup-memcached.md b/howto/setup-state-store/setup-memcached.md index e251c8b4e..7667150a4 100644 --- a/howto/setup-state-store/setup-memcached.md +++ b/howto/setup-state-store/setup-memcached.md @@ -31,11 +31,12 @@ The next step is to create a Dapr component for Memcached. Create the following YAML file named `memcached.yaml`: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.memcached metadata: diff --git a/howto/setup-state-store/setup-mongodb.md b/howto/setup-state-store/setup-mongodb.md index d51ecb26f..3b2c1d5fd 100644 --- a/howto/setup-state-store/setup-mongodb.md +++ b/howto/setup-state-store/setup-mongodb.md @@ -39,7 +39,8 @@ Create the following YAML file named `mongodb.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.mongodb metadata: @@ -65,11 +66,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr The following example uses the Kubernetes secret store to retrieve the username and password: -``` +```yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.mondodb metadata: diff --git a/howto/setup-state-store/setup-redis.md b/howto/setup-state-store/setup-redis.md index aa42fd207..0491ee9bc 100644 --- a/howto/setup-state-store/setup-redis.md +++ b/howto/setup-state-store/setup-redis.md @@ -67,6 +67,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore + namespace: default spec: type: state.redis metadata: diff --git a/howto/setup-state-store/setup-sqlserver.md b/howto/setup-state-store/setup-sqlserver.md index 15b726ed3..84219140d 100644 --- a/howto/setup-state-store/setup-sqlserver.md +++ b/howto/setup-state-store/setup-sqlserver.md @@ -23,7 +23,8 @@ Create the following YAML file named `sqlserver.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.sqlserver metadata: @@ -41,7 +42,8 @@ The following example uses the Kubernetes secret store to retrieve the secrets: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.sqlserver metadata: diff --git a/howto/setup-state-store/setup-zookeeper.md b/howto/setup-state-store/setup-zookeeper.md index 0103177ed..7cfc22b0c 100644 --- a/howto/setup-state-store/setup-zookeeper.md +++ b/howto/setup-state-store/setup-zookeeper.md @@ -36,7 +36,8 @@ Create the following YAML file named `zookeeper.yaml`: apiVersion: dapr.io/v1alpha1 kind: Component metadata: - name: + name: + namespace: spec: type: state.zookeeper metadata: diff --git a/howto/trigger-app-with-input-binding/README.md b/howto/trigger-app-with-input-binding/README.md index e39f0f9dc..603ee944c 100644 --- a/howto/trigger-app-with-input-binding/README.md +++ b/howto/trigger-app-with-input-binding/README.md @@ -29,6 +29,7 @@ apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: myEvent + namespace: default spec: type: bindings.kafka metadata: