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
The following commit(s) were added to refs/heads/main by this push:
new 1702502 doc: add helm charts to readme and add helm charts manual
new 7c1dd27 Merge pull request #45 from mlycore/charts-doc
1702502 is described below
commit 1702502bf08879efac2032905a274aadf84d30c2
Author: mlycore <[email protected]>
AuthorDate: Wed Aug 24 12:43:12 2022 +0800
doc: add helm charts to readme and add helm charts manual
Signed-off-by: mlycore <[email protected]>
---
README.md | 24 ++-
doc/shardingsphere-helm-charts.md | 243 ++++++++++++++++++++++++++
doc/{deploy.md => shardingsphere-operator.md} | 0
3 files changed, 264 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 12c60be..cab3acc 100644
--- a/README.md
+++ b/README.md
@@ -12,12 +12,30 @@ This repository collects scripts, tools, manifests and
documentations, provides
Solutions currently included in this project:
-* [The
ShardingSphere-Operator](https://github.com/apache/shardingsphere-on-cloud/tree/main/shardingsphere-operator)
+* [The ShardingSphere Helm
Charts](https://github.com/apache/shardingsphere-on-cloud/tree/main/charts/shardingsphere-proxy)
+* [The ShardingSphere
Operator](https://github.com/apache/shardingsphere-on-cloud/tree/main/shardingsphere-operator)
-The ShardingSphere operator uses predefined CustomResourceDefinitions for
describing a Deployment for Apache ShardingSphere on Kubernetes.
+
+## ShardingSphere Helm Charts
+
+The ShardingSphere Helm Charts uses [Helm](https://helm.sh/) to provide
guidance for the installation of ShardingSphere-Proxy instance in a Kubernetes
cluster.
+
+
+### Requirements
+
+* [Kubernetes 1.18+]()
+* [kubectl](https://kubernetes.io/docs/reference/kubectl/)
+* [Helm 3.2.0+](https://helm.sh/)
+* [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)
of [PV (Persistent
Volumes)](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) can
be dynamically applied for persistent data (Optional)
+
+### Quick Start
+
+Please follows [instructions](./doc/shardingsphere-helm-charts.md) to deploy a
ShardingSphere cluster with version 5.1.2
## ShardingSphere Operator
+The ShardingSphere Operator uses predefined CustomResourceDefinitions for
describing a Deployment for Apache ShardingSphere on Kubernetes.
+
### Prerequisites
With the help of ShardingSphere-Operator you could create a
ShardingSphere-Proxy cluster including the ZooKeeper cluster in minutes.
@@ -34,7 +52,7 @@ Minimum Viable Product
### Quick Start
-Please follows [deployment instructions](./doc/deploy.md) to deploy a
ShardingSphere cluster with version 5.1.2
+Please follows [instructions](./doc/shardingsphere-operator.md) to deploy a
ShardingSphere cluster with version 5.1.2
### Features
diff --git a/doc/shardingsphere-helm-charts.md
b/doc/shardingsphere-helm-charts.md
new file mode 100644
index 0000000..3797615
--- /dev/null
+++ b/doc/shardingsphere-helm-charts.md
@@ -0,0 +1,243 @@
+# ShardingSphere Helm Charts Concise User Manual
+
+## Procedure
+
+### Online installation
+
+1. Add ShardingSphere-Proxy to the local helm repo:
+
+```shell
+helm repo add shardingsphere https://shardingsphere.apache.org/charts
+```
+
+1. Install ShardingSphere-Proxy charts:
+
+```shell
+helm install shardingsphere-proxy shardingsphere/shardingsphere-proxy
+```
+
+### Source installation
+
+1. Charts will be installed with default configuration if the following
commands are executed:
+
+```shell
+cd shardingsphere-proxy/charts/governance
+helm dependency build
+cd ../..
+helm dependency build
+cd ..
+helm install shardingsphere-proxy shardingsphere-proxy
+```
+1. Please refer to the configuration items description below for more details:
+
+1. Execute `helm list` to acquire all installed releases.
+
+### Uninstall
+
+1. Delete all release records by default, add `--keep-history` to keep them.
+
+```shell
+helm uninstall shardingsphere-proxy
+```
+
+## Parameters
+
+### Governance-Node parameters
+
+| Name | Description
| Value |
+| -------------------- | -----------------------------------------------------
| ------ |
+| `governance.enabled` | Switch to enable or disable the governance helm chart
| `true` |
+
+### Governance-Node ZooKeeper parameters
+
+| 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` |
+
+### Compute-Node ShardingSphere-Proxy parameters
+
+| 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 | `""` |
+
+## Sample
+
+values.yaml
+
+```PlainText
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+## @section Governance-Node parameters
+## @param governance.enabled Switch to enable or disable the governance helm
chart
+##
+governance:
+ enabled: true
+ ## @section Governance-Node ZooKeeper parameters
+ zookeeper:
+ ## @param governance.zookeeper.enabled Switch to enable or disable the
ZooKeeper helm chart
+ ##
+ enabled: true
+ ## @param governance.zookeeper.replicaCount Number of ZooKeeper nodes
+ ##
+ replicaCount: 1
+ ## ZooKeeper Persistence parameters
+ ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
+ ## @param governance.zookeeper.persistence.enabled Enable persistence on
ZooKeeper using PVC(s)
+ ## @param governance.zookeeper.persistence.storageClass Persistent Volume
storage class
+ ## @param governance.zookeeper.persistence.accessModes Persistent Volume
access modes
+ ## @param governance.zookeeper.persistence.size Persistent Volume size
+ ##
+ persistence:
+ enabled: false
+ storageClass: ""
+ accessModes:
+ - ReadWriteOnce
+ size: 8Gi
+ ## ZooKeeper's resource requests and limits
+ ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
+ ## @param governance.zookeeper.resources.limits The resources limits for
the ZooKeeper containers
+ ## @param governance.zookeeper.resources.requests.memory The requested
memory for the ZooKeeper containers
+ ## @param governance.zookeeper.resources.requests.cpu The requested cpu
for the ZooKeeper containers
+ ##
+ resources:
+ limits: {}
+ requests:
+ memory: 256Mi
+ cpu: 250m
+
+## @section Compute-Node parameters
+##
+compute:
+ ## @section Compute-Node ShardingSphere-Proxy parameters
+ ## ref: https://kubernetes.io/docs/concepts/containers/images/
+ ## @param compute.image.repository Image name of ShardingSphere-Proxy.
+ ## @param compute.image.pullPolicy The policy for pulling
ShardingSphere-Proxy image
+ ## @param compute.image.tag ShardingSphere-Proxy image tag
+ ##
+ image:
+ repository: "apache/shardingsphere-proxy"
+ pullPolicy: IfNotPresent
+ ## Overrides the image tag whose default is the chart appVersion.
+ ##
+ tag: "5.1.2"
+ ## @param compute.imagePullSecrets Specify docker-registry secret names as
an array
+ ## e.g:
+ ## imagePullSecrets:
+ ## - name: myRegistryKeySecretName
+ ##
+ imagePullSecrets: []
+ ## ShardingSphere-Proxy resource requests and limits
+ ## ref:
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ ## @param compute.resources.limits The resources limits for the
ShardingSphere-Proxy containers
+ ## @param compute.resources.requests.memory The requested memory for the
ShardingSphere-Proxy containers
+ ## @param compute.resources.requests.cpu The requested cpu for the
ShardingSphere-Proxy containers
+ ##
+ resources:
+ limits: {}
+ requests:
+ memory: 2Gi
+ cpu: 200m
+ ## ShardingSphere-Proxy Deployment Configuration
+ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/
+ ## @param compute.replicas Number of cluster replicas
+ ##
+ replicas: 3
+ ## @param compute.service.type ShardingSphere-Proxy network mode
+ ## @param compute.service.port ShardingSphere-Proxy expose port
+ ##
+ service:
+ type: ClusterIP
+ port: 3307
+ ## MySQL connector Configuration
+ ## ref:
https://shardingsphere.apache.org/document/current/en/quick-start/shardingsphere-proxy-quick-start/
+ ## @param compute.mysqlConnector.version MySQL connector version
+ ##
+ mysqlConnector:
+ version: "5.1.49"
+ ## @param compute.startPort ShardingSphere-Proxy start port
+ ## ShardingSphere-Proxy start port
+ ## ref:
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/startup/docker/
+ ##
+ startPort: 3307
+ ## @section Compute-Node ShardingSphere-Proxy ServerConfiguration parameters
+ ## NOTE: If you use the sub-charts to deploy Zookeeper, the server-lists
field must be "{{ printf \"%s-zookeeper.%s:2181\" .Release.Name
.Release.Namespace }}",
+ ## otherwise please fill in the correct zookeeper address
+ ## The server.yaml is auto-generated based on this parameter.
+ ## If it is empty, the server.yaml is also empty.
+ ## ref:
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/mode/
+ ## ref:
https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/metadata-repository/
+ ##
+ serverConfig:
+ ## @section Compute-Node ShardingSphere-Proxy ServerConfiguration
authority parameters
+ ## NOTE: It is used to set up initial user to login compute node, and
authority data of storage node.
+ ## ref:
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/yaml-config/authentication/
+ ## @param compute.serverConfig.authority.privilege.type authority provider
for storage node, the default value is ALL_PERMITTED
+ ## @param compute.serverConfig.authority.users[0].password Password for
compute node.
+ ## @param compute.serverConfig.authority.users[0].user Username,authorized
host for compute node. Format: <username>@<hostname> hostname is % or empty
string means do not care about authorized host
+ ##
+ authority:
+ privilege:
+ type: ALL_PRIVILEGES_PERMITTED
+ users:
+ - password: root
+ user: root@%
+ ## @section Compute-Node ShardingSphere-Proxy ServerConfiguration mode
Configuration parameters
+ ## @param compute.serverConfig.mode.type Type of mode configuration. Now
only support Cluster mode
+ ## @param compute.serverConfig.mode.repository.props.namespace Namespace
of registry center
+ ## @param compute.serverConfig.mode.repository.props.server-lists Server
lists of registry center
+ ## @param compute.serverConfig.mode.repository.props.maxRetries Max
retries of client connection
+ ## @param
compute.serverConfig.mode.repository.props.operationTimeoutMilliseconds
Milliseconds of operation timeout
+ ## @param
compute.serverConfig.mode.repository.props.retryIntervalMilliseconds
Milliseconds of retry interval
+ ## @param compute.serverConfig.mode.repository.props.timeToLiveSeconds
Seconds of ephemeral data live
+ ## @param compute.serverConfig.mode.repository.type Type of persist
repository. Now only support ZooKeeper
+ ## @param compute.serverConfig.mode.overwrite Whether overwrite persistent
configuration with local configuration
+ ##
+ 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
+`
diff --git a/doc/deploy.md b/doc/shardingsphere-operator.md
similarity index 100%
rename from doc/deploy.md
rename to doc/shardingsphere-operator.md