From 0bb903663d76af68e9710ea2ca87d45f357d2dc6 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Wed, 8 May 2024 16:15:41 -0400 Subject: [PATCH] add actorStateStore to specs Signed-off-by: Hannah Hunter --- .../supported-state-stores/setup-azure-cosmosdb.md | 5 ++++- .../supported-state-stores/setup-dynamodb.md | 4 ++++ .../supported-state-stores/setup-etcd.md | 4 ++++ .../supported-state-stores/setup-inmemory.md | 5 ++++- .../supported-state-stores/setup-mongodb.md | 5 +++++ .../supported-state-stores/setup-mysql.md | 4 ++++ .../supported-state-stores/setup-oracledatabase.md | 4 ++++ .../supported-state-stores/setup-redis.md | 4 ++++ .../supported-state-stores/setup-sqlserver.md | 3 +++ 9 files changed, 36 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md index d7ee723ea..8f2015e3d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md @@ -28,6 +28,9 @@ spec: value: - name: collection value: + # Uncomment this if you wish to use Azure Cosmos DB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -49,7 +52,7 @@ If you wish to use Cosmos DB as an actor store, append the following to the yam | masterKey | Y* | The key to authenticate to the Cosmos DB account. Only required when not using Microsoft Entra ID authentication. | `"key"` | database | Y | The name of the database | `"db"` | collection | Y | The name of the collection (container) | `"collection"` -| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ### Microsoft Entra ID authentication diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md index a3b1781de..32150cafe 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-dynamodb.md @@ -36,6 +36,9 @@ spec: value: "expiresAt" # Optional - name: partitionKey value: "ContractID" # Optional + # Uncomment this if you wish to use AWS DynamoDB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -58,6 +61,7 @@ In order to use DynamoDB as a Dapr state store, the table must have a primary ke | sessionToken | N |AWS session token to use. A session token is only required if you are using temporary security credentials. | `"TOKEN"` | ttlAttributeName | N |The table attribute name which should be used for TTL. | `"expiresAt"` | partitionKey | N |The table primary key or partition key attribute name. This field is used to replace the default primary key attribute name `"key"`. See the section [Partition Keys]({{< ref "setup-dynamodb.md#partition-keys" >}}). | `"ContractID"` +| actorStateStore | N | Consider this state store for actors. Defaults to "false" | `"true"`, `"false"` {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md index 63ee61ac2..6b40c5241 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-etcd.md @@ -34,6 +34,9 @@ spec: value: # Optional. Required if tlsEnable is `true`. - name: key value: # Optional. Required if tlsEnable is `true`. + # Uncomment this if you wish to use Etcd as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -59,6 +62,7 @@ If you are using `v1`, you should continue to use `v1` until you create a new Et | `ca` | N | CA certificate for connecting to Etcd, PEM-encoded. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}).| `"-----BEGIN CERTIFICATE-----\nMIIC9TCCA..."` | `cert` | N | TLS certificate for connecting to Etcd, PEM-encoded. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}).| `"-----BEGIN CERTIFICATE-----\nMIIDUTCC..."` | `key` | N | TLS key for connecting to Etcd, PEM-encoded. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}).| `"-----BEGIN PRIVATE KEY-----\nMIIEpAIB..."` +| `actorStateStore` | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## Setup Etcd diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md index 17d8cc4be..50d20f500 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-inmemory.md @@ -21,7 +21,10 @@ metadata: spec: type: state.in-memory version: v1 - metadata: [] + metadata: + # Uncomment this if you wish to use In-memory as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` > Note: While in-memory does not require any specific metadata for the component to work, `spec.metadata` is a required field. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md index db3fec2ed..35a91276f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mongodb.md @@ -41,6 +41,10 @@ spec: value: # Optional. default: "5s" - name: params value: # Optional. Example: "?authSource=daprStore&ssl=true" + # Uncomment this if you wish to use MongoDB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" + ``` {{% alert title="Warning" color="warning" %}} @@ -72,6 +76,7 @@ If you wish to use MongoDB as an actor store, add this metadata option to your C | readConcern | N | The read concern to use | `"majority"`, `"local"`,`"available"`, `"linearizable"`, `"snapshot"` | operationTimeout | N | The timeout for the operation. Defaults to `"5s"` | `"5s"` | params | N2 | Additional parameters to use | `"?authSource=daprStore&ssl=true"` +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` > [1] The `server` and `host` fields are mutually exclusive. If neither or both are set, Dapr returns an error. diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md index 65000b4d1..29867aa1e 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-mysql.md @@ -35,6 +35,9 @@ spec: value: "" - name: pemContents # Required if pemPath not provided. Pem value. value: "" +# Uncomment this if you wish to use MySQL & MariaDB as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -59,6 +62,7 @@ If you wish to use MySQL as an actor store, append the following to the yaml. | `pemPath` | N | Full path to the PEM file to use for [enforced SSL Connection](#enforced-ssl-connection) required if pemContents is not provided. Cannot be used in K8s environment | `"/path/to/file.pem"`, `"C:\path\to\file.pem"` | | `pemContents` | N | Contents of PEM file to use for [enforced SSL Connection](#enforced-ssl-connection) required if pemPath is not provided. Can be used in K8s environment | `"pem value"` | | `cleanupIntervalInSeconds` | N | Interval, in seconds, to clean up rows with an expired TTL. Default: `3600` (that is 1 hour). Setting this to values <=0 disables the periodic cleanup. | `1800`, `-1` +| `actorStateStore` | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## Setup MySQL diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md index b023a2ef7..51cf0a020 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-oracledatabase.md @@ -28,6 +28,9 @@ spec: value: "" # Optional, no default - name: tableName value: "" # Optional, defaults to STATE + # Uncomment this if you wish to use Oracle Database as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). @@ -40,6 +43,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | connectionString | Y | The connection string for Oracle Database | `"oracle://user/password@host:port/servicename"` for example `"oracle://demo:demo@localhost:1521/xe"` or for Autonomous Database `"oracle://states_schema:State12345pw@adb.us-ashburn-1.oraclecloud.com:1522/k8j2agsqjsw_daprdb_low.adb.oraclecloud.com"` | oracleWalletLocation | N | Location of the contents of an Oracle Wallet file (required to connect to Autonomous Database on OCI)| `"/home/app/state/Wallet_daprDB/"` | tableName | N | Name of the database table in which this instance of the state store records the data default `"STATE"`| `"MY_APP_STATE_STORE"` +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## What Happens at Runtime? When the state store component initializes, it connects to the Oracle Database and checks if a table with the name specified with `tableName` exists. If it does not, it creates this table (with columns Key, Value, Binary_YN, ETag, Creation_Time, Update_Time, Expiration_time). diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md index 366bbde0d..da1f2bf04 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-redis.md @@ -74,6 +74,9 @@ spec: value: # Optional - name: queryIndexes value: # Optional + # Uncomment this if you wish to use Redis as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}} @@ -119,6 +122,7 @@ If you wish to use Redis as an actor store, append the following to the yaml. | actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` | ttlInSeconds | N | Allows specifying a default Time-to-live (TTL) in seconds that will be applied to every state store request unless TTL is explicitly defined via the [request metadata]({{< ref "state-store-ttl.md" >}}). | `600` | queryIndexes | N | Indexing schemas for querying JSON objects | see [Querying JSON objects](#querying-json-objects) +| actorStateStore | N | Consider this state store for actors. Defaults to `"false"` | `"true"`, `"false"` ## Setup Redis diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md index 96d79ac9d..23b9a1075 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-sqlserver.md @@ -52,6 +52,9 @@ spec: value: "" - name: cleanupIntervalInSeconds value: "3600" + # Uncomment this if you wish to use Microsoft SQL Server as a state store for actors (optional) + #- name: actorStateStore + # value: "true" ``` {{% alert title="Warning" color="warning" %}}