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 e9b1956c2bed849be0f6ba43b60a3c94e7fe1e9b Author: Ghoul_Lee <[email protected]> AuthorDate: Thu Jul 21 11:37:51 2022 +0800 fix(doc): fix the IA photo (#24) * fix(doc): fix the IA photo Signed-off-by: windghoul <[email protected]> * fix(doc): fix charts dependencies version Signed-off-by: windghoul <[email protected]> * fix(doc): fix charts dependencies version,fix default cpu core request 2.8 to 0.4 ,fix typo Signed-off-by: windghoul <[email protected]> --- README.md | 2 +- charts/shardingsphere-cluster/Chart.yaml | 4 ++-- charts/shardingsphere-operator/Chart.yaml | 2 +- doc/deploy.md | 18 +++++++++--------- doc/images/ss-operatorIA.png | Bin 735662 -> 732926 bytes .../api/v1alpha1/proxy_webhook.go | 4 ++-- shardingsphere-operator/build/Dockerfile | 6 +++--- shardingsphere-operator/main.go | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 70c5f8d..8799453 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Minimum Viable Product ### Quick Start -Please follows [deployment instructions](./doc/deploy.md) +Please follows [deployment instructions](./doc/deploy.md) to deploy a ShardingSphere cluster with version 5.1.2 ### Features diff --git a/charts/shardingsphere-cluster/Chart.yaml b/charts/shardingsphere-cluster/Chart.yaml index 5fd2f48..7f04ab5 100644 --- a/charts/shardingsphere-cluster/Chart.yaml +++ b/charts/shardingsphere-cluster/Chart.yaml @@ -21,12 +21,12 @@ dependencies: - condition: zookeeper.enabled name: zookeeper repository: https://charts.bitnami.com/bitnami - version: 9.x.x + version: 9.2.7 - name: common repository: https://charts.bitnami.com/bitnami tags: - bitnami-common - version: 1.x.x + version: 1.16.1 type: application version: 0.1.0 appVersion: "5.1.2" diff --git a/charts/shardingsphere-operator/Chart.yaml b/charts/shardingsphere-operator/Chart.yaml index 22896e6..7a1b707 100644 --- a/charts/shardingsphere-operator/Chart.yaml +++ b/charts/shardingsphere-operator/Chart.yaml @@ -25,4 +25,4 @@ dependencies: repository: https://charts.bitnami.com/bitnami tags: - bitnami-common - version: 1.x.x + version: 1.16.1 diff --git a/doc/deploy.md b/doc/deploy.md index b50199b..bc96097 100644 --- a/doc/deploy.md +++ b/doc/deploy.md @@ -1,6 +1,6 @@ # ShardingSphere-Operator Concise User Manual -## install ShardingSphere-Operator +## Install ShardingSphere-Operator Configuration [below](#shardingsphere-operator-parameters) configuration content, configuration file location shardingsphere-operator/values.yaml run @@ -9,7 +9,7 @@ run kubectl create ns shardingsphere-operator helm install shardingsphere-operator shardingsphere-operator -n shardingsphere-operator ``` -## install ShardingSphere-Proxy cluster +## Install ShardingSphere-Proxy cluster Configuration [below](#shardingsphere-proxy-cluster-parameters) configuration content, configuration file location shardingsphere-cluster/values.yaml run @@ -19,7 +19,7 @@ kubectl create ns shardingsphere helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere ``` ## Parameters -### ShardingSphere Operator parameters +### ShardingSphere Operator Parameters | Name | Description | Value | | ------------------------ | ------------------------------------------- | ------------------------- | @@ -33,7 +33,7 @@ helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere | `health.healthProbePort` | operator health check port | `8081` | -### ShardingSphere-Proxy Cluster parameters +### ShardingSphere-Proxy Cluster Parameters | Name | Description | Value | | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | @@ -52,7 +52,7 @@ helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere | `mySQLDriver.version` | ShardingSphere-Proxy The ShardingSphere-Proxy mysql driver version will not be downloaded if it is empty | `5.1.47` | -### Compute-Node ShardingSphere-Proxy ServerConfiguration authority parameters +### Compute-Node ShardingSphere-Proxy ServerConfiguration Authority Parameters | Name | Description | Value | | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | @@ -61,7 +61,7 @@ helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere | `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 | `root@%` | -### Compute-Node ShardingSphere-Proxy ServerConfiguration mode Configuration parameters +### Compute-Node ShardingSphere-Proxy ServerConfiguration Mode Configuration Parameters | Name | Description | Value | | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------- | @@ -77,7 +77,7 @@ helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere | `serverConfig.props.proxy-frontend-database-protocol-type` | Default startup protocol | `MySQL` | -### ZooKeeper chart parameters +### ZooKeeper Chart Parameters | Name | Description | Value | | ------------------------------------ | ---------------------------------------------------- | ------------------- | @@ -89,7 +89,7 @@ helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere | `zookeeper.persistence.size` | Persistent Volume size | `8Gi` | -## Configuration example +## Configuration Example shardingsphere-operator/values.yaml @@ -257,7 +257,7 @@ zookeeper: -## clean +## Clean ```shell helm uninstall shardingsphere-cluster -n shardingsphere diff --git a/doc/images/ss-operatorIA.png b/doc/images/ss-operatorIA.png index 1ff5317..85431a9 100644 Binary files a/doc/images/ss-operatorIA.png and b/doc/images/ss-operatorIA.png differ diff --git a/shardingsphere-operator/api/v1alpha1/proxy_webhook.go b/shardingsphere-operator/api/v1alpha1/proxy_webhook.go index aa441d9..d4e8d99 100644 --- a/shardingsphere-operator/api/v1alpha1/proxy_webhook.go +++ b/shardingsphere-operator/api/v1alpha1/proxy_webhook.go @@ -80,11 +80,11 @@ func (r *ShardingSphereProxy) Default() { } } if r.Spec.Resources == nil { - // The application for resources is based on the upper limit of cpu: 2core memory: 2Gi to apply for computing resources. + // The application for resources is based on the upper limit of cpu: 4core memory: 2Gi to apply for computing resources. // The cpu is applied according to 10%, and the memory is applied according to 80% cpuLimits, _ := resource.ParseQuantity("4") memoryLimits, _ := resource.ParseQuantity("2Gi") - cpuRequest, _ := resource.ParseQuantity("2.8") + cpuRequest, _ := resource.ParseQuantity("400m") memoryRequest, _ := resource.ParseQuantity("1600Mbi") r.Spec.Resources = &v1.ResourceRequirements{ Limits: v1.ResourceList{ diff --git a/shardingsphere-operator/build/Dockerfile b/shardingsphere-operator/build/Dockerfile index f9ffd5a..067b8b8 100644 --- a/shardingsphere-operator/build/Dockerfile +++ b/shardingsphere-operator/build/Dockerfile @@ -34,14 +34,14 @@ COPY shardingsphere-operator/api api/ COPY shardingsphere-operator/pkg pkg/ RUN mkdir -p certs && cd certs && openssl req -new -SHA256 -newkey rsa:2048 -nodes -keyout tls.key -out tls.csr -subj "/C=CN/ST=beijing/L=beijing/O=/OU=/" && openssl x509 -req -sha256 -days 365 -in tls.csr -signkey tls.key -out tls.crt # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -gcflags "-N -l" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -gcflags "-N -l" -a -o operator main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details FROM alpine:3.15.4 WORKDIR / -COPY --from=builder /workspace/manager . +COPY --from=builder /workspace/operator . USER root COPY --from=builder /workspace/certs /etc/operator/certs -ENTRYPOINT ["/manager"] +ENTRYPOINT ["/operator"] diff --git a/shardingsphere-operator/main.go b/shardingsphere-operator/main.go index da35ba2..dfa8e6a 100644 --- a/shardingsphere-operator/main.go +++ b/shardingsphere-operator/main.go @@ -113,9 +113,9 @@ func main() { os.Exit(1) } - setupLog.Info("starting manager") + setupLog.Info("starting operator") if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { - setupLog.Error(err, "problem running manager") + setupLog.Error(err, "problem running operator") os.Exit(1) } }
