From 905342cdcd9cdca84ecbc514d6742a473a0e1511 Mon Sep 17 00:00:00 2001 From: sophon Date: Thu, 19 Oct 2023 11:40:58 +0800 Subject: [PATCH] chore: add env SERVICE_PORT for collecting metrics by the oteld (#5527) --- deploy/apecloud-mysql/templates/clusterdefinition.yaml | 4 ++++ deploy/mongodb/templates/clusterdefinition.yaml | 2 ++ deploy/postgresql/templates/clusterdefinition.yaml | 2 ++ deploy/pulsar/templates/clusterdefinition.yaml | 10 ++++++++++ deploy/redis/templates/clusterdefinition.yaml | 8 ++++++++ 5 files changed, 26 insertions(+) diff --git a/deploy/apecloud-mysql/templates/clusterdefinition.yaml b/deploy/apecloud-mysql/templates/clusterdefinition.yaml index 6749fcc9fd2..e372ae8073d 100644 --- a/deploy/apecloud-mysql/templates/clusterdefinition.yaml +++ b/deploy/apecloud-mysql/templates/clusterdefinition.yaml @@ -109,6 +109,8 @@ spec: - containerPort: 13306 name: paxos env: + - name: SERVICE_PORT + value: "3306" - name: MYSQL_ROOT_HOST value: {{ .Values.auth.rootHost | default "%" | quote }} - name: MYSQL_ROOT_USER @@ -235,6 +237,8 @@ spec: value: "$(KB_CLUSTER_NAME)-vtcontroller-headless" - name: VTCTLD_WEB_PORT value: "15000" + - name: SERVICE_PORT + value: "$(VTTABLET_PORT)" - name: MYSQL_ROOT_USER valueFrom: secretKeyRef: diff --git a/deploy/mongodb/templates/clusterdefinition.yaml b/deploy/mongodb/templates/clusterdefinition.yaml index 81786f753d7..ddece2cdabb 100644 --- a/deploy/mongodb/templates/clusterdefinition.yaml +++ b/deploy/mongodb/templates/clusterdefinition.yaml @@ -107,6 +107,8 @@ spec: command: - /scripts/replicaset-setup.sh env: + - name: SERVICE_PORT + value: "27017" - name: MONGODB_ROOT_USER valueFrom: secretKeyRef: diff --git a/deploy/postgresql/templates/clusterdefinition.yaml b/deploy/postgresql/templates/clusterdefinition.yaml index 6543c773067..884851f9bd1 100644 --- a/deploy/postgresql/templates/clusterdefinition.yaml +++ b/deploy/postgresql/templates/clusterdefinition.yaml @@ -158,6 +158,8 @@ spec: - name: patroni containerPort: 8008 env: ## refer https://github.com/zalando/spilo/blob/master/ENVIRONMENT.rst + - name: SERVICE_PORT + value: "5432" - name: DCS_ENABLE_KUBERNETES_API value: "true" - name: KUBERNETES_USE_CONFIGMAPS diff --git a/deploy/pulsar/templates/clusterdefinition.yaml b/deploy/pulsar/templates/clusterdefinition.yaml index 38c83fc402c..e305b146918 100644 --- a/deploy/pulsar/templates/clusterdefinition.yaml +++ b/deploy/pulsar/templates/clusterdefinition.yaml @@ -143,6 +143,8 @@ spec: - name: PULSAR_LOG_LEVEL value: DEBUG {{- end }} + - name: SERVICE_PORT + value: "8080" - name: POD_NAME value: $(KB_POD_NAME) - name: PULSAR_PREFIX_brokerServicePort @@ -331,6 +333,8 @@ spec: - name: PULSAR_LOG_LEVEL value: DEBUG {{- end }} + - name: SERVICE_PORT + value: "8080" - name: brokerWebServiceURL value: http://$(brokerSVC):80 - name: brokerServiceURL @@ -482,6 +486,8 @@ spec: - name: PULSAR_LOG_LEVEL value: DEBUG {{- end }} + - name: SERVICE_PORT + value: "8000" - name: cluster_domain value: {{ .Values.clusterDomain }} lifecycle: @@ -649,6 +655,8 @@ spec: - name: PULSAR_LOG_LEVEL value: DEBUG {{- end }} + - name: SERVICE_PORT + value: "8000" - name: httpServerEnabled value: "true" - name: httpServerPort @@ -751,6 +759,8 @@ spec: - name: PULSAR_LOG_LEVEL value: DEBUG {{- end }} + - name: SERVICE_PORT + value: "8000" - name: EXTERNAL_PROVIDED_SERVERS value: "false" - name: OPTS diff --git a/deploy/redis/templates/clusterdefinition.yaml b/deploy/redis/templates/clusterdefinition.yaml index 2fe21b69ce1..9fd447ae867 100644 --- a/deploy/redis/templates/clusterdefinition.yaml +++ b/deploy/redis/templates/clusterdefinition.yaml @@ -74,6 +74,8 @@ spec: - name: pod-info mountPath: /kb-podinfo env: + - name: SERVICE_PORT + value: "6379" - name: REDIS_REPL_USER value: "kbreplicator" - name: REDIS_REPL_PASSWORD @@ -82,6 +84,12 @@ spec: name: $(CONN_CREDENTIAL_SECRET_NAME) key: password optional: false + - name: REDIS_DEFAULT_USER + valueFrom: + secretKeyRef: + name: $(CONN_CREDENTIAL_SECRET_NAME) + key: username + optional: false - name: REDIS_DEFAULT_PASSWORD valueFrom: secretKeyRef: