This is an automated email from the ASF dual-hosted git repository. duanzhengqiang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git
commit 2adf096213c968e98518de3b76b76b788ef941bc Author: Ghoul_Lee <[email protected]> AuthorDate: Wed Jun 29 15:26:41 2022 +0800 feat(doc): add some Annotation, update quick start doc (#12) --- doc/quickStart.md | 37 ++-------------------- .../api/v1alpha1/serverconfig.go | 2 ++ .../shardingsphere.sphere-ex.com_proxyconfigs.yaml | 4 ++- .../charts/shardingsphere-operator/values.yaml | 6 ++++ 4 files changed, 14 insertions(+), 35 deletions(-) diff --git a/doc/quickStart.md b/doc/quickStart.md index ee60d15..dd12505 100644 --- a/doc/quickStart.md +++ b/doc/quickStart.md @@ -1,6 +1,5 @@ # ShardingSphere-Operator 简明使用手册 -⚠️⚠️⚠️⚠️ 现阶段因为 shardingsphere-proxy 5.1.2 还未发布。proxyConfig 功能还不能使用,请使用前自行挂载现阶段版本支持的 server.yaml ⚠️⚠️⚠️⚠️ ## 配置 **Proxy.shardingsphere.sphere-ex.com/v1alpha1** @@ -10,7 +9,7 @@ kind: Proxy metadata: name: proxy-sample spec: - version: "5.1.1" + version: "5.1.2" serviceType: type: ClusterIP replicas: 1 @@ -87,35 +86,7 @@ health: serviceAccount: name: shardingsphere-operator ``` -<span id=002>**用于 v5.1.1 测试的配置文件**</span> -```yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: sharding-proxy - namespace: default -data: - server.yaml: |- - mode: - type: Cluster - repository: - type: ZooKeeper - props: - namespace: governance_ds - server-lists: zookeeper.default:2181 - retryIntervalMilliseconds: 500 - timeToLiveSeconds: 600 - maxRetries: 3 - operationTimeoutMilliseconds: 5000 - overwrite: false - rules: - - !AUTHORITY - users: - - root@%:root - provider: - type: ALL_PRIVILEGES_PERMITTED -``` ## 安装 ShardingSphere-Operator 按照[values.yaml](#001)中的配置完成对 charts/shardingsphere-operator/values.yaml @@ -127,9 +98,7 @@ helm install shardingsphere-operator shardingsphere-operator -n shardingsphere- ``` ## 安装 ShardingSphere-Proxy - -首先新建一个[configmap.yaml](#002) ```shell -kubectl apply -f deploy/samples/shardingsphere_v1alpha1_proxy.yaml -kubectl apply -f configmap.yaml +kubectl apply -f shardingsphere-operator/deploy/samples/shardingsphere_v1alpha1_proxy.yaml +kubectl apply -f shardingsphere-operator/deploy/samples/shardingsphere_v1alpha1_proxyconfig.yaml ``` diff --git a/shardingsphere-operator/api/v1alpha1/serverconfig.go b/shardingsphere-operator/api/v1alpha1/serverconfig.go index 6591a6a..7431dc0 100644 --- a/shardingsphere-operator/api/v1alpha1/serverconfig.go +++ b/shardingsphere-operator/api/v1alpha1/serverconfig.go @@ -102,5 +102,7 @@ type ClusterConfig struct { // Persist repository configuration Repository RepositoryConfig `json:"repository" yaml:"repository"` // Whether overwrite persistent configuration with local configuration + // If it is false, it will not upload the local configuration to ZooKeeper. + // If it is true, it will upload the local configuration to ZooKeeper and overwrite the original configuration of ZooKeeper. Overwrite bool `json:"overwrite" yaml:"overwrite"` } diff --git a/shardingsphere-operator/charts/shardingsphere-operator/crds/shardingsphere.sphere-ex.com_proxyconfigs.yaml b/shardingsphere-operator/charts/shardingsphere-operator/crds/shardingsphere.sphere-ex.com_proxyconfigs.yaml index 0cd0d8e..8a1626c 100644 --- a/shardingsphere-operator/charts/shardingsphere-operator/crds/shardingsphere.sphere-ex.com_proxyconfigs.yaml +++ b/shardingsphere-operator/charts/shardingsphere-operator/crds/shardingsphere.sphere-ex.com_proxyconfigs.yaml @@ -77,7 +77,9 @@ spec: properties: overwrite: description: Whether overwrite persistent configuration with local - configuration + configuration. If it is false, it will not upload the local configuration + to ZooKeeper. If it is true, it will upload the local configuration + to ZooKeeper and overwrite the original configuration of ZooKeeper. type: boolean repository: description: Persist repository configuration diff --git a/shardingsphere-operator/charts/shardingsphere-operator/values.yaml b/shardingsphere-operator/charts/shardingsphere-operator/values.yaml index 0057274..ecc2cc2 100644 --- a/shardingsphere-operator/charts/shardingsphere-operator/values.yaml +++ b/shardingsphere-operator/charts/shardingsphere-operator/values.yaml @@ -2,6 +2,12 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +# There is now a special directory called crds that you can create in your chart to hold your CRDs. +# Some caveats (and explanations) +# There is no support at this time for upgrading or deleting CRDs using Helm. +# This was an explicit decision after much community discussion due to the danger for unintentional data loss. +# Furthermore, there is currently no community consensus around how to handle CRDs and their lifecycle. +# As this evolves, Helm will add support for those use cases. replicaCount: 2 image:
