Merge pull request #552 from mchmarny/master

Add namespace metadata to all yaml samples
This commit is contained in:
Mark Chmarny 2020-05-03 08:15:53 -07:00 committed by GitHub
commit 9d1919ef94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
79 changed files with 235 additions and 124 deletions

View File

@ -9,11 +9,12 @@ First, check your Deployment or Pod YAML file, and check that you have the follo
Sample deployment:
<pre>
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nodeapp
namespace: default
labels:
app: node
spec:
@ -36,7 +37,7 @@ spec:
ports:
- containerPort: 3000
imagePullPolicy: Always
</pre>
```
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.

View File

@ -30,6 +30,7 @@ apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: zipkin
namespace: default
spec:
tracing:
enabled: true
@ -74,11 +75,12 @@ For Standalone mode, create a Dapr configuration file locally and reference it w
1. Create the following YAML file:
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: zipkin
namespace: default
spec:
tracing:
enabled: true

View File

@ -93,6 +93,7 @@ apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: myappconfig
namespace: default
spec:
tracing:
enabled: true
@ -121,11 +122,12 @@ workloadCertTTL | string | Time a certificate is valid for. Default is 24 hours
Example control plane configuration
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: default
namespace: default
spec:
mtls:
enabled: true

View File

@ -17,6 +17,7 @@ apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: pipeline
namespace: default
spec:
httpPipeline:
handlers:

View File

@ -59,6 +59,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: pythonapp
namespace: default
labels:
app: python
spec:

View File

@ -28,13 +28,14 @@ Dapr uses the standard W3C Trace Context headers. For HTTP requests, Dapr uses `
Dapr uses [probalistic sampling](https://opencensus.io/tracing/sampling/probabilistic/) as defined by OpenCensus. The sample rate defines the probaility a tracing span will be sampled and can have a value between 0 and 1 (inclusive). The deafault sample rate is 0.0001 (i.e. 1 in 10,000 spans is sampled).
To change the default tracing behavior, use a configuration file (in local mode) or a Kubernetes configuration object (in Kubernetes mode). For example, the following configuration object changes the sample rate to 1 (i.e. every span is sampled):
To change the default tracing behavior, use a configuration file (in self hosted mode) or a Kubernetes configuration object (in Kubernetes mode). For example, the following configuration object changes the sample rate to 1 (i.e. every span is sampled):
```yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: tracing
namespace: default
spec:
tracing:
samplingRate: "1"
@ -42,15 +43,16 @@ spec:
Similarly, changing `samplingRate` to 0 will disable tracing altogether.
Please see the [References](#references) section for more details on how to configure tracing on local environment and Kubernetes environment.
See the [References](#references) section for more details on how to configure tracing on local environment and Kubernetes environment.
Dapr supports pluggable exporters, defined by configuration files (in local mode) or a Kubernetes custom resource object (in Kubernetes mode). For example, the following manifest defines a Zipkin exporter:
Dapr supports pluggable exporters, defined by configuration files (in self hosted mode) or a Kubernetes custom resource object (in Kubernetes mode). For example, the following manifest defines a Zipkin exporter:
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: zipkin
namespace: default
spec:
type: exporters.zipkin
metadata:

View File

@ -38,6 +38,7 @@ apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
namespace: default
spec:
type: state.redis
metadata:
@ -54,6 +55,7 @@ apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
namespace: default
spec:
type: state.redis
metadata:
@ -81,11 +83,12 @@ kubectl create secret generic eventhubs-secret --from-literal=connectionString=*
Next, reference the secret in your binding:
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: eventhubs
namespace: default
spec:
type: bindings.azure.eventhubs
metadata:

View File

@ -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:

View File

@ -29,6 +29,7 @@ apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: kafkaevent
namespace: default
spec:
type: bindings.kafka
metadata:

View File

@ -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"

View File

@ -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:

View File

@ -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:

View File

@ -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:
<pre>
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nodesubscriber
namespace: default
labels:
app: nodesubscriber
spec:
@ -36,7 +37,7 @@ spec:
dapr.io/port: "3000"
<b>dapr.io/max-concurrency: "1"</b>
...
</pre>
```
### Setting max-concurrency using the Dapr CLI

View File

@ -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:
<pre>
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
namespace: default
labels:
app: myapp
spec:
@ -38,7 +39,7 @@ spec:
<b>dapr.io/protocol: "grpc"
dapr.io/port: "5005"</b>
...
</pre>
```
This tells Dapr to communicate with your app via gRPC over port `5005`.

View File

@ -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"

View File

@ -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:

View File

@ -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:

View File

@ -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"

View File

@ -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:
<pre>
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: python-app
namespace: default
labels:
app: python-app
spec:
@ -49,7 +50,7 @@ spec:
<b>dapr.io/id: "cart"</b>
dapr.io/port: "5000"
...
</pre>
```
## Invoke a service in code

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -27,6 +27,7 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: fluentd
namespace: default
roleRef:
kind: ClusterRole
name: fluentd

View File

@ -74,6 +74,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: pythonapp
namespace: default
labels:
app: python
spec:

View File

@ -115,6 +115,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: pythonapp
namespace: default
labels:
app: python
spec:

View File

@ -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.<NAME>
metadata:

View File

@ -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: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: pubsub.azure.servicebus
metadata:

View File

@ -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: <NAME>
namespace: <NAMESPACE>
spec:
type: pubsub.gcp.pubsub
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: pubsub.hazelcast
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: pubsub.nats
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: pubsub.rabbitmq
metadata:

View File

@ -60,6 +60,7 @@ apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: messagebus
namespace: default
spec:
type: pubsub.redis
metadata:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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.<DATABASE>
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.Aerospike
metadata:

View File

@ -19,11 +19,12 @@ The next step is to create a Dapr component for CosmosDB.
Create the following YAML file named `cosmos.yaml`:
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <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: <store_name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.azure.cosmosdb
metadata:

View File

@ -18,11 +18,12 @@ The next step is to create a Dapr component for Azure Table Storage.
Create the following YAML file named `azuretable.yaml`:
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.azure.tablestorage
metadata:

View File

@ -32,11 +32,12 @@ The next step is to create a Dapr component for Cassandra.
Create the following YAML file named `cassandra.yaml`:
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.cassandra
metadata:

View File

@ -21,11 +21,12 @@ The next step is to create a Dapr component for Cloudstate.
Create the following YAML file named `cloudstate.yaml`:
```
```yaml
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

View File

@ -31,11 +31,12 @@ The next step is to create a Dapr component for Consul.
Create the following YAML file named `consul.yaml`:
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.consul
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.couchbase
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.etcd
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.gcp.firestore
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.hazelcast
metadata:

View File

@ -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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.memcached
metadata:

View File

@ -35,11 +35,12 @@ The next step is to create a Dapr component for MongoDB.
Create the following YAML file named `mongodb.yaml`:
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.mondodb
metadata:

View File

@ -67,6 +67,7 @@ apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
namespace: default
spec:
type: state.redis
metadata:

View File

@ -23,7 +23,8 @@ Create the following YAML file named `sqlserver.yaml`:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <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>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.sqlserver
metadata:

View File

@ -32,11 +32,12 @@ The next step is to create a Dapr component for Zookeeper.
Create the following YAML file named `zookeeper.yaml`:
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.zookeeper
metadata:

View File

@ -24,11 +24,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:

View File

@ -15,11 +15,12 @@ Examples for bindings include ```Kafka```, ```Rabbit MQ```, ```Azure Event Hubs`
A Dapr Binding yaml file has the following structure:
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.<TYPE>
metadata:
@ -54,6 +55,7 @@ apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: kafkaevent
namespace: default
spec:
type: bindings.kafka
metadata:

View File

@ -13,11 +13,12 @@
A Dapr State Store component yaml file has the following structure:
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.<TYPE>
metadata:
@ -222,11 +223,12 @@ Actors don't support multiple state stores and require a transactional state sto
To specify which state store to be used for actors, specify value of property `actorStateStore` as true in the metadata section of the state store component yaml file.
Example: Following components yaml will configure redis to be used as the state store for Actors.
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
namespace: default
spec:
type: state.redis
metadata:

View File

@ -1,10 +1,11 @@
# Azure Blob Storage Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.blobstorage
metadata:

View File

@ -1,10 +1,11 @@
# Azure CosmosDB Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.cosmosdb
metadata:

View File

@ -1,10 +1,11 @@
# AWS DynamoDB Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.aws.dynamodb
metadata:

View File

@ -2,11 +2,12 @@
See [this](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-dotnet-framework-getstarted-send) for instructions on how to set up an Event Hub.
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.eventhubs
metadata:

View File

@ -1,10 +1,11 @@
# GCP Storage Bucket Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.gcp.bucket
metadata:

View File

@ -1,10 +1,11 @@
# GCP Cloud Pub/Sub Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.gcp.pubsub
metadata:

View File

@ -1,10 +1,11 @@
# HTTP Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.http
metadata:

View File

@ -1,10 +1,11 @@
# Kafka Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.kafka
metadata:

View File

@ -2,11 +2,12 @@
See [this](https://aws.amazon.com/kinesis/data-streams/getting-started/) for instructions on how to set up an AWS Kinesis data streams
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.aws.kinesis
metadata:

View File

@ -1,10 +1,11 @@
# Kubernetes Events Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.kubernetes
metadata:

View File

@ -1,10 +1,11 @@
# MQTT Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.mqtt
metadata:

View File

@ -1,10 +1,11 @@
# RabbitMQ Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.rabbitmq
metadata:

View File

@ -1,10 +1,11 @@
# Redis Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.redis
metadata:

View File

@ -1,10 +1,11 @@
# AWS S3 Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.aws.s3
metadata:

View File

@ -1,10 +1,11 @@
# SendGrid Binding Spec
```
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: sendgrid
namespace: default
spec:
type: bindings.twilio.sendgrid
metadata:

View File

@ -1,10 +1,11 @@
# Azure Service Bus Queues Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.servicebusqueues
metadata:

View File

@ -4,7 +4,8 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.signalr
metadata:

View File

@ -1,10 +1,11 @@
# AWS SNS Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.aws.sns
metadata:

View File

@ -1,10 +1,11 @@
# AWS SQS Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.aws.sqs
metadata:

View File

@ -4,7 +4,8 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.storagequeues
metadata:

View File

@ -1,10 +1,11 @@
# Twilio SMS Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.twilio.sms
metadata:

View File

@ -1,28 +1,22 @@
# Kubernetes Events Binding Spec
# Twitter Binding Spec
```yml
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <name>
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.twitter
metadata:
- name: consumerKey
value: ''
value: "****" # twitter api consumer key, required
- name: consumerSecret
value: ''
value: "****" # twitter api consumer secret, required
- name: accessToken
value: ''
value: "****" # twitter api access token, required
- name: accessSecret
value: ''
value: "****" # twitter api access secret, required
- name: query
value: ''
value: "dapr" # your search query, required
```
- `consumerKey` (required) is the Twitter API consumer key
- `consumerSecret` (required) is the Twitter API consumer secret
- `accessToken` (required) is the Twitter API access token
- `accessSecret` (required) is the Twitter API access secret
- `query` (required) is the Twitter search query (e.g. `dapr`)