You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/05/17 10:57:38 UTC

[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #17740: Refactor helm to use the new values.yaml structure

terrymanu commented on code in PR #17740:
URL: https://github.com/apache/shardingsphere/pull/17740#discussion_r874665305


##########
shardingsphere-charts/shardingsphere-proxy/charts/governance/Chart.yaml:
##########
@@ -38,4 +38,11 @@ version: 1.0.0
 # incremented each time you make changes to the application. Versions are not expected to
 # follow Semantic Versioning. They should reflect the version the application is using.
 # It is recommended to use it with quotes.
-appVersion: "5.7"
+appVersion: "5.1.2"
+maintainers:
+  - name: windghoul

Review Comment:
   It is better to leave `dev@shardingsphere.apache.org`



##########
shardingsphere-charts/shardingsphere-proxy/values.yaml:
##########
@@ -15,66 +15,127 @@
 #  limitations under the License.
 #
 
-## @section Global Configuration
-## Global Configuration
-## ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-## @param global.resources.limits The resources limits for all containers
-## @param global.resources.requests The requested resources for all containers
-global:
-  resources:
-    limits: {}
-    requests: {}
-
-## @section MySQL Configuration
-## MySQL Configuration
-## ref:https://kubernetes.io/docs/concepts/storage/storage-classes/
-## @param mysql.enabled Enable MySQL sub-charts dependency
-## @param mysql.storageclass Storage class needed by MySQL persistent storage
-## @param mysql.storagerequest Space for MySQL persistent storage
-mysql:
-  enabled: true
-  storageclass:
-  storagerequest:
-
-## @section ZooKeeper Configuration
-## ZooKeeper Configuration
-## ref:https://kubernetes.io/docs/concepts/storage/storage-classes/
-## @param zookeeper.enabled Enable ZooKeeper sub-charts dependency
-## @param zookeeper.storageclass Storage class needed by ZooKeeper persistent storage
-## @param zookeeper.storagerequest Space for ZooKeeper persistent storage
-zookeeper:
+## @section Governance-Node parameters
+## @param governance.enabled Switch to enable or disable the governance helm chart
+##
+governance:
   enabled: true
-  storageclass:
-  storagerequest:
+  ## @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 ShardingSphere-Proxy Configuration
-## Image Parameters
-## ref: https://kubernetes.io/docs/concepts/containers/images/
-## @param image.repository Image name of ShardingSphere-Proxy. Pull from apache official repository by default
-## @param image.pullPolicy The policy for pulling an image
-## @param image.tag Image tag
-image:
-  repository: apache/shardingsphere-proxy
-  pullPolicy: IfNotPresent
-  # Overrides the image tag whose default is the chart appVersion.
-  tag: "5.1.1"
+## @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: 1.6Gi
+      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
+  ## @param compute.serverConfig ServerConfiguration file for ShardingSphere-Proxy
+  ## 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/cn/user-manual/shardingsphere-jdbc/builtin-algorithm/metadata-repository/
+  ## e.g:
+  ## serverConfig:
+  ##   authority:
+  ##    privilege:
+  ##      type: ALL_PRIVILEGES_PERMITTED
+  ##    users:
+  ##    - password: root
+  ##      user: root@%
+  ##   mode:
+  ##    overwrite: true
+  ##    repository:
+  ##      props:
+  ##        maxRetries: 3
+  ##        namespace: governance_ds
+  ##        operationTimeoutMilliseconds: 5000
+  ##        retryIntervalMilliseconds: 500
+  ##        server-lists: "{{ printf \"%s-zookeeper.%s:2181\" .Release.Name .Release.Namespace }}"
+  ##        timeToLiveSeconds: 600
+  ##      type: ZooKeeper
+  ##    type: Cluster
+  ##
+  serverConfig: ""
 
-## Deployment Configuration
-## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
-## ref: https://kubernetes.io/docs/concepts/services-networking/service/
-## @param replicas Number of cluster replicas
-## @param service.type Network mode
-replicas: 3
-service:
-  type: NodePort
-## MySQL connector Configuration
-## ref: https://shardingsphere.apache.org/document/5.1.0/en/quick-start/shardingsphere-proxy-quick-start/
-## @param mysqlconnector.enabled MySQL connector enabled
-## @param mysqlconnector.version MySQL connector version
-mysqlconnector:
-  enabled: true
-  version: 5.1.49
-## ShardingSphere-Proxy start port
-## ref: https://shardingsphere.apache.org/document/5.1.0/cn/user-manual/shardingsphere-proxy/startup/docker/
-## @param proxyport start port
-proxyport: 3307
+    

Review Comment:
   Please add new line in end of file



##########
shardingsphere-charts/README_ZH.md:
##########
@@ -47,40 +47,44 @@ helm uninstall shardingsphere-proxy
 
 默认删除所有发布记录,增加 `--keep-history` 参数保留发布记录。
 
-## 配置项说明
-
-### 全局配置
-
-| 名称                       | 描述           | 默认值  |
-| ------------------------- | -------------- | ----- |
-| global.resources.limits   | 容器的全局资源限制 | {}    |
-| global.resources.requests | 容器的全局资源申请 | {}    |
-
-### ShardingSphere-Proxy 配置
-
-| 名称                    | 描述                                                    | 默认值                        |
-| ---------------------- | ------------------------------------------------------- | --------------------------- |
-| image.repository       | ShardingSphere-Proxy 镜像名,默认是从 Apache 官方镜像仓库拉取 | apache/ShardingSphere-Proxy |
-| image.pullPolicy       | 镜像拉取策略                                              | IfNotPresent                |
-| image.tag              | 镜像 tag                                                 | 5.1.0                       |
-| service.type           | 网络模式                                                  | NodePort                    |
-| replicas               | 集群副本数                                                | 3                           |
-| proxyport              | 启动端口                                                  | 3307                        |
-| mysqlconnector.enabled | MySQL 驱动开启开关                                         | true                        |
-| mysqlconnector.version | MySQL 驱动版本                                            | 5.1.49                      |
-
-### MySQL 配置
-
-| 名称                  | 描述                              | 默认值  |
-|--------------------- | -------------------------------- | ------ |
-| mysql.enabled        | 开启 MySQL 子 charts 依赖          | true   |
-| mysql.storageclass   | MySQL 持久化存储需要的 StorageClass | nil    |
-| mysql.storagerequest | MySQL 持久化存储需要的空间           | nil    |
-
-### ZooKeeper 配置
-
-| 名称                      | 描述                                  | 默认值  |
-|------------------------- | ------------------------------------ | ------ |
-| zookeeper.enabled        | 开启 ZooKeeper 子 charts 依赖          | true   |
-| zookeeper.storageclass   | ZooKeeper 持久化存储需要的 StorageClass | nil    |
-| zookeeper.storagerequest | ZooKeeper 持久化存储需要的空间           | nil    |
+## 配置项
+
+### 治理节点配置项
+
+| 配置项                  | 描述                  | 值      |
+|----------------------|---------------------|--------|
+| `governance.enabled` | 用来切换是否使用治理节点的 chart | `true` |
+
+
+### 治理节点--ZooKeeper 配置项
+
+| 配置项                                               | 描述                                                                        | 值                   |
+|--------------------------------------------------|---------------------------------------------------------------------------|---------------------|
+| `governance.zookeeper.enabled`                   | 用来切换是否使用 ZooKeeper 的 chart                                                | `true`              |
+| `governance.zookeeper.replicaCount`              | ZooKeeper 节点数量                                                            | `1`                 |
+| `governance.zookeeper.persistence.enabled`       | 标识  ZooKeeper 是否使用持久卷申领 (PersistentVolumeClaim) 用来申请持久卷(PersistentVolume) | `false`             |
+| `governance.zookeeper.persistence.storageClass`  | 持久卷(PersistentVolume)的存储类 (StorageClass)                                  | `""`                |
+| `governance.zookeeper.persistence.accessModes`   | 持久卷(PersistentVolume)的访问模式                                                | `["ReadWriteOnce"]` |
+| `governance.zookeeper.persistence.size`          | 持久卷(PersistentVolume) 大小                                                  | `8Gi`               |
+| `governance.zookeeper.resources.limits`          | ZooKeeper 容器的资源限制                                                         | `{}`                |
+| `governance.zookeeper.resources.requests.memory` | ZooKeeper 容器申请的内存                                                         | `256Mi`             |
+| `governance.zookeeper.resources.requests.cpu`    | ZooKeeper 容器申请的 cpu 核数                                                    | `250m`              |
+
+
+### 计算节点--ShardingSphere-Proxy  配置项

Review Comment:
   Please just keep one space between `ShardingSphere-Proxy` and `配置项`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org