Skip to content

Commit

Permalink
Merge request #57 from stardb:dev_jieker on 2023-06-07 16:14:07
Browse files Browse the repository at this point in the history
adjust chats
  • Loading branch information
xiaoyu137 committed Jun 7, 2023
2 parents 6e4108c + 417f270 commit dc6238c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 96 deletions.
13 changes: 1 addition & 12 deletions chart/stardb-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,4 @@ apiVersion: v2
appVersion: 5.3.2
name: stardb-proxy
version: 0.16.0
#maintainers:
# - name: [email protected]
#dependencies:
# - condition: governance.enabled
# name: governance
# repository: file://./charts/governance
# version: 1.x.x
# - name: common
# repository: https://charts.bitnami.com/bitnami
# tags:
# - bitnami-common
# version: 1.x.x

2 changes: 2 additions & 0 deletions chart/stardb-proxy/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ spec:
env:
- name: PORT
value: "{{ .Values.compute.startPort }}"
- name: WITH_AGENT
value: "{{ .Values.compute.agent.enabled }}"
ports:
- name: start-port
containerPort: {{ .Values.compute.startPort }}
Expand Down
83 changes: 2 additions & 81 deletions chart/stardb-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,138 +15,59 @@
# 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: 3
## 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: 4Gi
cpu: 2

## @section Compute-Node parameters
##
compute:
clusterName: wzm
namespace: wzm-test
## @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: "jvesselv2-dockerhub-test.jdcloud.com/stardb/stardb"
hub: "jvesselv2-dockerhub-test.jdcloud.com"
pullPolicy: IfNotPresent
## Overrides the image tag whose default is the chart appVersion.
##
tag: "5.3.2"
imagePullSecrets:
name: jvessel-secret
user:
passwd:
## 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:
requests:
cpu: 2
memory: 2Gi
limits:
cpu: 4
memory: 4Gi
## 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: LoadBalancer
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: ""
## @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
# agent:
# enabled: true
agent:
enabled: true
# terminationGracePeriodSeconds: 30
## @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/shardingsphere-jdbc/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_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:
# repository:
# props:
Expand Down
4 changes: 4 additions & 0 deletions distribution/proxy/dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ARG RUNTIME_IMAGE=hub.jdcloud.com/stardb/openjdk-amd64:17

FROM ${BUILD_IMAGE} AS prepare
ARG APP_NAME="stardb-proxy-bin-5.3.2"
ARG AGENT_NAME="stardb-agent-bin-5.3.2"
ARG WORK_DIR="/usr/src/mymaven"
ENV LOCAL_PATH="/opt/stardb-proxy"

Expand All @@ -31,6 +32,9 @@ WORKDIR /usr/src/mymaven/distribution/proxy/target
RUN tar -zxvf ${APP_NAME}.tar.gz -C /opt
RUN mv /opt/${APP_NAME} ${LOCAL_PATH} && mkdir -p ${LOCAL_PATH}/ext-lib

RUN tar -zxvf ${AGENT_NAME}.tar.gz -C /opt
RUN mkdir -p ${LOCAL_PATH}/agent && mv /opt/${AGENT_NAME} ${LOCAL_PATH}/agent

FROM ${RUNTIME_IMAGE}
LABEL maintainer="[email protected]"

Expand Down
4 changes: 4 additions & 0 deletions distribution/proxy/dockerfile/Dockerfile-openeuler22-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ARG RUNTIME_IMAGE=hub.jdcloud.com/stardb/openjdk-amd64:17

FROM ${BUILD_IMAGE} AS prepare
ARG APP_NAME="stardb-proxy-bin-5.3.2"
ARG AGENT_NAME="stardb-agent-bin-5.3.2"
ARG WORK_DIR="/usr/src/mymaven"
ENV LOCAL_PATH="/opt/stardb-proxy"

Expand All @@ -31,6 +32,9 @@ WORKDIR /usr/src/mymaven/distribution/proxy/target
RUN tar -zxvf ${APP_NAME}.tar.gz -C /opt
RUN mv /opt/${APP_NAME} ${LOCAL_PATH} && mkdir -p ${LOCAL_PATH}/ext-lib

RUN tar -zxvf ${AGENT_NAME}.tar.gz -C /opt
RUN mkdir -p ${LOCAL_PATH}/agent && mv /opt/${AGENT_NAME} ${LOCAL_PATH}/agent

FROM ${RUNTIME_IMAGE}
LABEL maintainer="[email protected]"

Expand Down
4 changes: 4 additions & 0 deletions distribution/proxy/dockerfile/Dockerfile-openeuler22-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ARG RUNTIME_IMAGE=hub.jdcloud.com/stardb/openjdk-arm64:17

FROM ${BUILD_IMAGE} AS prepare
ARG APP_NAME="stardb-proxy-bin-5.3.2"
ARG AGENT_NAME="stardb-agent-bin-5.3.2"
ARG WORK_DIR="/usr/src/mymaven"
ENV LOCAL_PATH="/opt/stardb-proxy"

Expand All @@ -31,6 +32,9 @@ WORKDIR /usr/src/mymaven/distribution/proxy/target
RUN tar -zxvf ${APP_NAME}.tar.gz -C /opt
RUN mv /opt/${APP_NAME} ${LOCAL_PATH} && mkdir -p ${LOCAL_PATH}/ext-lib

RUN tar -zxvf ${AGENT_NAME}.tar.gz -C /opt
RUN mkdir -p ${LOCAL_PATH}/agent && mv /opt/${AGENT_NAME} ${LOCAL_PATH}/agent

FROM ${RUNTIME_IMAGE}
LABEL maintainer="[email protected]"

Expand Down
4 changes: 1 addition & 3 deletions distribution/proxy/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ fi
JAVA_MEM_OPTS=" -server ${JAVA_MEM_COMMON_OPTS} -Xss1m -XX:AutoBoxCacheMax=4096 -XX:+UseNUMA -XX:+DisableExplicitGC -XX:LargePageSizeInBytes=128m ${VERSION_OPTS} -Dio.netty.leakDetection.level=DISABLED "




MAIN_CLASS=org.apache.shardingsphere.proxy.Bootstrap

unset -v PORT
Expand Down Expand Up @@ -158,7 +156,7 @@ PARAMETER_INDEX=0
PARAMETERS=( $* )
for arg in $*
do
if [ "$arg" == "-g" ] || [ "$arg" == "--agent" ] ; then
if [ "$arg" == "-g" ] || [ "$arg" == "--agent" ] || [ -n "${WITH_AGENT}" ]; then
set_agent_name
set_agent_parameter
unset PARAMETERS[PARAMETER_INDEX]
Expand Down

0 comments on commit dc6238c

Please sign in to comment.