Skip to content

Commit 9a9ca5d

Browse files
JoshVanLmarcduikermsfussell
authored
[1.16] Alibaba Cloud Table Store State Store Component (#4841)
Fixes #4795 Signed-off-by: joshvanl <[email protected]> Co-authored-by: Marc Duiker <[email protected]> Co-authored-by: Mark Fussell <[email protected]>
1 parent 6021c7d commit 9a9ca5d

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
type: docs
3+
title: "Alibaba Cloud TableStore"
4+
linkTitle: "Alibaba Cloud TableStore"
5+
description: "Detailed information on the Alibaba Cloud TableStore state store component for use with Dapr"
6+
aliases:
7+
- "/operations/components/setup-state-store/supported-state-stores/setup-alicloud-tablestore/"
8+
---
9+
10+
## Component format
11+
12+
To set up an Alibaba Cloud TableStore state store, create a component of type `state.alicloud.tablestore`.
13+
See [this guide]({{% ref "howto-get-save-state.md#step-1-setup-a-state-store" %}}) on how to create and apply a state store configuration.
14+
15+
```yaml
16+
apiVersion: dapr.io/v1alpha1
17+
kind: Component
18+
metadata:
19+
name: <NAME>
20+
spec:
21+
type: state.alicloud.tablestore
22+
version: v1
23+
metadata:
24+
- name: endpoint
25+
value: <REPLACE-WITH-ENDPOINT>
26+
- name: instanceName
27+
value: <REPLACE-WITH-INSTANCE-NAME>
28+
- name: tableName
29+
value: <REPLACE-WITH-TABLE-NAME>
30+
- name: accessKeyID
31+
value: <REPLACE-WITH-ACCESS-KEY-ID>
32+
- name: accessKey
33+
value: <REPLACE-WITH-ACCESS-KEY>
34+
````
35+
36+
{{% alert title="Warning" color="warning" %}}
37+
The above example uses secrets as plain strings.
38+
It is recommended to use a secret store for the secrets as described [here]({{% ref component-secrets.md %}}).
39+
{{% /alert %}}
40+
41+
## Spec metadata fields
42+
43+
| Field | Required | Details | Example |
44+
| -------------- | :------: | --------------------------------------------------------------------------------- | ----------------------------------- |
45+
| `endpoint` | Y | The endpoint of the Alibaba Cloud TableStore instance | `"https://tablestore.aliyuncs.com"` |
46+
| `instanceName` | Y | The name of the Alibaba Cloud TableStore instance | `"my_instance"` |
47+
| `tableName` | Y | The name of the table to use for Dapr state. Will be created if it does not exist | `"my_table"` |
48+
| `accessKeyID` | Y | The access key ID for authentication | `"my_access_key_id"` |
49+
| `accessKey` | Y | The access key for authentication | `"my_access_key"` |
50+
51+
---
52+
53+
## Authentication
54+
55+
Alibaba Cloud TableStore supports authentication using an **Access Key** and **Access Key ID**.
56+
57+
You can also use Dapr's \[secret store]\({{% ref component-secrets.md %}}) to securely store these values instead of including them directly in the YAML file.
58+
59+
Example using secret references:
60+
61+
```yaml
62+
- name: accessKeyID
63+
secretKeyRef:
64+
name: alicloud-secrets
65+
key: accessKeyID
66+
- name: accessKey
67+
secretKeyRef:
68+
name: alicloud-secrets
69+
key: accessKey
70+
```
71+
72+
---
73+
74+
75+
## Related links
76+
- [Basic schema for a Dapr component]({{% ref component-schema %}})
77+
- Read [this guide]({{% ref "howto-get-save-state.md#step-2-save-and-retrieve-a-single-state" %}}) for instructions on configuring state store components
78+
- [State management building block]({{% ref state-management %}})
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- component: AliCloud TableStore
2+
link: setup-alicloud-tablestore
3+
state: Alpha
4+
version: v1
5+
since: "1.3"
6+
features:
7+
crud: true
8+
etag: true

daprdocs/layouts/_partials/components/state-stores.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"Amazon Web Services (AWS)" $.Site.Data.components.state_stores.aws
66
"Cloudflare" $.Site.Data.components.state_stores.cloudflare
77
"Oracle Cloud" $.Site.Data.components.state_stores.oracle
8+
"Alibaba Cloud" $.Site.Data.components.state_stores.alicloud
89
}}
910

1011
{{ range $group, $components := $groups }}
@@ -77,4 +78,4 @@ <h3>{{ $group }}</h3>
7778
</table>
7879
{{ end }}
7980

80-
{{ partial "components/componenttoc.html" . }}
81+
{{ partial "components/componenttoc.html" . }}

0 commit comments

Comments
 (0)