Project: ShardingSphere (App Definition and Development / Database)
File: helm.en.md

+++ title = "Use Helm" weight = 3 +++ Use to provide guidance for the installation of ShardingSphere-Proxy instance in a Kubernetes cluster. For more details, please checkout . Kubernetes 1.18+ kubectl Helm 3.2.0+ StorageClass of PV (Persistent Volumes) can be dynamically applied for persistent data (Optional) . Add ShardingSphere-Proxy to the local helm repo: ```shell helm repo add shardingsphere https://shardingsphere.apache.org/charts ``` Install ShardingSphere-Proxy charts: ```shell helm install shardingsphere-proxy shardingsphere/shardingsphere-proxy ``` Charts will be installed with default configuration if the following commands are executed: ```shell git clone https://github.com/apache/shardingsphere-on-cloud.git cd charts/shardingsphere-proxy/charts/governance helm dependency build cd ../.. helm dependency build cd .. helm install shardingsphere-proxy shardingsphere-proxy ``` Note: Please refer to the configuration items description below for more details: Execute `helm list` to acquire all installed releases. Delete all release records by default, add `--keep-history` to keep them. ```shell helm uninstall shardingsphere-proxy ``` | Name | Description | Value | |-|-|--| | `governance.enabled` | Switch to enable or disable the governance helm chart | `true` | | Name | Description | Value | |--||| | `governance.zookeeper.enabled` | Switch to enable or disable the ZooKeeper helm chart | `true` | | `governance.zookeeper.replicaCount` | Number of ZooKeeper nodes | `1` | | `governance.zookeeper.persistence.enabled` | Enable persistence on ZooKeeper using PVC(s) | `false` | | `governance.zookeeper.persistence.storageClass` | Persistent Volume storage class | `""` | | `governance.zookeeper.persistence.accessModes` | Persistent Volume access modes | `["ReadWriteOnce"]` | | `governance.zookeeper.persistence.size` | Persistent Volume size | `8Gi` | | `governance.zookeeper.resources.limits` | The resources limits for the ZooKeeper containers | `{}` | | `governance.zookeeper.resources.requests.memory` | The requested memory for the ZooKeeper containers | `256Mi` | | `governance.zookeeper.resources.requests.cpu` | The requested cpu for the ZooKeeper containers | `250m` | | Name | Description | Value | |-|--|-| | `compute.image.repository` | Image name of ShardingSphere-Proxy. | `apache/shardingsphere-proxy` | | `compute.image.pullPolicy` | The policy for pulling ShardingSphere-Proxy image | `IfNotPresent` | | `compute.image.tag` | ShardingSphere-Proxy image tag | `5.1.2` | | `compute.imagePullSecrets` | Specify docker-registry secret names as an array | `[]` | | `compute.resources.limits` | The resources limits for the ShardingSphere-Proxy containers | `{}` | | `compute.resources.requests.memory` | The requested memory for the ShardingSphere-Proxy containers | `2Gi` | | `compute.resources.requests.cpu` | The requested cpu for the ShardingSphere-Proxy containers | `200m` | | `compute.replicas` | Number of cluster replicas | `3` | | `compute.service.type` | ShardingSphere-Proxy network mode | `ClusterIP` | | `compute.service.port` | ShardingSphere-Proxy expose port | `3307` | | `compute.mysqlConnector.version` | MySQL connector version | `5.1.49` | | `compute.startPort` | ShardingSphere-Proxy start port | `3307` | | `compute.serverConfig` | Server Configuration file for ShardingSphere-Proxy | `""` | values.yaml ```PlainText governance: enabled: true zookeeper: enabled: true replicaCount: 1 persistence: enabled: false storageClass: "" accessModes: ReadWriteOnce size: 8Gi resources: limits: {} requests: memory: 256Mi cpu: 250m compute: image: repository: "apache/shardingsphere-proxy" pullPolicy: IfNotPresent tag: "5.1.2" imagePullSecrets: [] resources: limits: {} requests: memory: 2Gi cpu: 200m replicas: 3 service: type: ClusterIP port: 3307 mysqlConnector: version: "5.1.49" startPort: 3307 serverConfig: authority: privilege: type: ALLPRIVILEGESPERMITTED users: password: root user: root@% mode: type: Cluster repository: type: ZooKeeper props: maxRetries: 3 namespace: governance_ds operationTimeoutMilliseconds: 5000 retryIntervalMilliseconds: 500 server-lists: "{{ printf \"%s-zookeeper.%s:2181\" .Release.Name .Release.Namespace }}" timeToLiveSeconds: 60 overwrite: true ```