Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ptyin committed Feb 29, 2024
1 parent 59c6dd5 commit f747955
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ To experience deploying Seata Server using the Operator method, follow these ste
serviceName: seata-server-cluster
replicas: 3
image: seataio/seata-server:latest
store:
resources:
requests:
storage: 5Gi
persistence:
volumeReclaimPolicy: Retain
spec:
resources:
requests:
storage: 5Gi
```

For the example above, if everything is correct, the controller will deploy 3 StatefulSet resources and a Headless Service to the cluster. You can access the Seata Server cluster in the cluster through `seata-server-0.seata-server-cluster.default.svc`.

### Reference
Expand All @@ -76,9 +78,11 @@ For CRD details, you can visit [operator.seata.apache.org_seataservers.yaml](con

5. `resources`: Used to define container resource requirements.

6. `store.resources`: Used to define mounted storage resource requirements.
6. `persistence.spec`: Used to define mounted storage resource requirements.

7. `persistence.volumeReclaimPolicy`: Used to control volume reclaim behavior, possible choices include `Retain` or `Delete`, which infer retain volumes or delete volumes after deletion respectively.

7. `env`: Environment variables passed to the container. You can use this field to define Seata Server configuration. For example:
8. `env`: Environment variables passed to the container. You can use this field to define Seata Server configuration. For example:

```yaml
apiVersion: operator.seata.apache.org/v1alpha1
Expand Down
20 changes: 12 additions & 8 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ https://github.com/seata/seata-docker
serviceName: seata-server-cluster
replicas: 3
image: seataio/seata-server:latest
store:
resources:
requests:
storage: 5Gi
persistence:
volumeReclaimPolicy: Retain
spec:
resources:
requests:
storage: 5Gi

```

对于上面这个 CR 的例子而言,如果一切正常的话,controller 将会部署 3 个 StatefulSet 资源和一个 Headless Service 到集群中;在集群中你可以通过 seata-server-0.seata-server-cluster.default.svc 对 Seata Server 集群进行访问。

### Reference
Expand All @@ -81,9 +83,11 @@ https://github.com/seata/seata-docker

5. `resources`: 用于定义容器的资源要求

6. `store.resources`: 用于定义挂载的存储资源要求
6. `persistence.spec`: 用于定义挂载的存储资源要求

7. `persistence.volumeReclaimPolicy`: 用于控制存储回收行为,允许的选项有 `Retain` 或者 `Delete`,分别代表了在 CR 删除之后保存存储卷或删除存储卷

7. `env`: 传递给容器的环境变量,可以通过此字段去定义 Seata Server 的配置,比如:
8. `env`: 传递给容器的环境变量,可以通过此字段去定义 Seata Server 的配置,比如:

```yaml
apiVersion: operator.seata.apache.org/v1alpha1
Expand All @@ -101,7 +105,7 @@ https://github.com/seata/seata-docker
console.user.username: seata
console.user.password: seata
```




Expand Down

0 comments on commit f747955

Please sign in to comment.