You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/03/30 10:55:12 UTC
[incubator-inlong] branch master updated: [INLONG-3449][InLong] Fix bugs in helm charts (#3472)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new f2fd644 [INLONG-3449][InLong] Fix bugs in helm charts (#3472)
f2fd644 is described below
commit f2fd644bdc3ce6b48697841f75978541e82fee44
Author: Yuanhao Ji <ts...@qq.com>
AuthorDate: Wed Mar 30 18:55:08 2022 +0800
[INLONG-3449][InLong] Fix bugs in helm charts (#3472)
---
docker/kubernetes/templates/_helpers.tpl | 7 ++++++
docker/kubernetes/templates/agent-service.yaml | 4 ++--
docker/kubernetes/templates/agent-statefulset.yaml | 6 ++---
docker/kubernetes/templates/audit-configmap.yaml | 26 ----------------------
docker/kubernetes/templates/audit-statefulset.yaml | 8 +++----
.../templates/dashboard-statefulset.yaml | 4 ++--
.../templates/dataproxy-statefulset.yaml | 6 ++---
docker/kubernetes/templates/manager-service.yaml | 2 +-
docker/kubernetes/templates/mysql-pvc.yaml | 2 +-
.../templates/tubemq-manager-statefulset.yaml | 2 +-
docker/kubernetes/values.yaml | 23 ++++++++-----------
11 files changed, 33 insertions(+), 57 deletions(-)
diff --git a/docker/kubernetes/templates/_helpers.tpl b/docker/kubernetes/templates/_helpers.tpl
index d67ceca..77dd442 100644
--- a/docker/kubernetes/templates/_helpers.tpl
+++ b/docker/kubernetes/templates/_helpers.tpl
@@ -74,6 +74,13 @@ release: {{ .Release.Name }}
{{- end -}}
{{/*
+Define the audit hostname
+*/}}
+{{- define "inlong.audit.hostname" -}}
+${HOSTNAME}.{{ template "inlong.fullname" . }}-{{ .Values.audit.component }}.{{ .Release.Namespace }}.svc.cluster.local
+{{- end -}}
+
+{{/*
Define the manager hostname
*/}}
{{- define "inlong.manager.hostname" -}}
diff --git a/docker/kubernetes/templates/agent-service.yaml b/docker/kubernetes/templates/agent-service.yaml
index 2659e8b..753122a 100644
--- a/docker/kubernetes/templates/agent-service.yaml
+++ b/docker/kubernetes/templates/agent-service.yaml
@@ -25,8 +25,8 @@ metadata:
component: {{ .Values.agent.component }}
spec:
ports:
- - name: {{ .Values.agent.component}}-port
- port: {{ .Values.agent.ports.agent }}
+ - name: {{ .Values.agent.component }}-port
+ port: {{ .Values.agent.containerPort }}
type: ClusterIP
selector:
{{- include "inlong.matchLabels" . | nindent 4 }}
diff --git a/docker/kubernetes/templates/agent-statefulset.yaml b/docker/kubernetes/templates/agent-statefulset.yaml
index f5b522f..f29ba85 100644
--- a/docker/kubernetes/templates/agent-statefulset.yaml
+++ b/docker/kubernetes/templates/agent-statefulset.yaml
@@ -85,13 +85,13 @@ spec:
- name: MANAGER_OPENAPI_IP
value: {{ include "inlong.manager.hostname" . | quote }}
- name: MANAGER_OPENAPI_PORT
- value: {{ .Values.agent.ports.managerOpenApi }}
+ value: {{ .Values.manager.containerPort | quote }}
- name: DATAPROXY_IP
value: {{ include "inlong.dataproxy.hostname" . | quote }}
- name: DATAPROXY_PORT
- value: {{ .Values.agent.ports.dataProxy }}
+ value: {{ .Values.dataproxy.containerPort | quote }}
- name: AUDIT_PROXY_URL
- value: {{ include "inlong.audit.hostname" . | quote }}:{{ .Values.audit.ports.webPort }}
+ value: "{{ template "inlong.audit.hostname" . }}:{{ .Values.audit.ports.webPort }}"
{{- range $key, $value := .Values.agent.env }}
- name: {{ $key }}
value: {{ $value | quote }}
diff --git a/docker/kubernetes/templates/audit-configmap.yaml b/docker/kubernetes/templates/audit-configmap.yaml
deleted file mode 100644
index 320a5f7..0000000
--- a/docker/kubernetes/templates/audit-configmap.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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.
-#
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ template "inlong.fullname" . }}-{{ .Values.audit.component }}
- namespace: {{ .Release.Namespace }}
- labels:
- component: {{ .Values.audit.component }}
-data:
- mysqlUsername: {{ .Values.mysql.username | default "root" | quote }}
diff --git a/docker/kubernetes/templates/audit-statefulset.yaml b/docker/kubernetes/templates/audit-statefulset.yaml
index 58aa5a5..ef2872f 100644
--- a/docker/kubernetes/templates/audit-statefulset.yaml
+++ b/docker/kubernetes/templates/audit-statefulset.yaml
@@ -66,7 +66,7 @@ spec:
do
replica="{{ template "inlong.fullname" . }}-{{ .Values.manager.component }}-$i"
host="$replica.{{ template "inlong.fullname" . }}-{{ .Values.manager.component }}.{{ .Release.Namespace }}.svc.cluster.local"
- port={{ .Values.manager.ports.webPort }}
+ port={{ .Values.manager.containerPort }}
until [ $(nc -z -w 5 $host $port; echo $?) -eq 0 ]
do
echo "waiting for $replica to be ready"
@@ -94,11 +94,11 @@ spec:
- name: MANAGER_OPENAPI_IP
value: {{ include "inlong.manager.hostname" . | quote }}
- name: MANAGER_OPENAPI_PORT
- value: {{ .Values.manager.ports.webPort | quote }}
+ value: {{ .Values.manager.containerPort | quote }}
- name: PULSAR_BROKER_LIST
- value: {{ .Values.external.pulsar.serviceUrl }}
+ value: {{ .Values.external.pulsar.serviceUrl | quote }}
- name: TUBE_MASTER_LIST
- value: {{ include "inlong.tubemqMaster.hostname" . | quote }}:{{ .Values.tubemqMaster.ports.rpcPort | quote }}
+ value: "{{ template "inlong.tubemqMaster.hostname" . }}:{{ .Values.tubemqMaster.ports.rpcPort }}"
{{- range $key, $value := .Values.audit.env }}
- name: {{ $key }}
value: {{ $value | quote }}
diff --git a/docker/kubernetes/templates/dashboard-statefulset.yaml b/docker/kubernetes/templates/dashboard-statefulset.yaml
index 1d02ff0..8f7a0dc 100644
--- a/docker/kubernetes/templates/dashboard-statefulset.yaml
+++ b/docker/kubernetes/templates/dashboard-statefulset.yaml
@@ -48,7 +48,7 @@ spec:
do
replica="{{ template "inlong.fullname" . }}-{{ .Values.manager.component }}-$i"
host="$replica.{{ template "inlong.fullname" . }}-{{ .Values.manager.component }}.{{ .Release.Namespace }}.svc.cluster.local"
- port={{ .Values.manager.ports.webPort }}
+ port={{ .Values.manager.containerPort }}
until [ $(nc -z -w 5 $host $port; echo $?) -eq 0 ]
do
echo "waiting for $replica to be ready"
@@ -57,7 +57,7 @@ spec:
done
containers:
- name: {{ template "inlong.fullname" . }}-{{ .Values.dashboard.component }}
- image: {{ .Values.images.dashboard.repository }}:{{ .Values.images.tubemqManager.tag }}
+ image: {{ .Values.images.dashboard.repository }}:{{ .Values.images.dashboard.tag }}
imagePullPolicy: {{ .Values.images.pullPolicy }}
{{- if .Values.dashboard.resources }}
resources:
diff --git a/docker/kubernetes/templates/dataproxy-statefulset.yaml b/docker/kubernetes/templates/dataproxy-statefulset.yaml
index 9db1ce6..e14f3fd 100644
--- a/docker/kubernetes/templates/dataproxy-statefulset.yaml
+++ b/docker/kubernetes/templates/dataproxy-statefulset.yaml
@@ -48,7 +48,7 @@ spec:
do
replica="{{ template "inlong.fullname" . }}-{{ .Values.manager.component }}-$i"
host="$replica.{{ template "inlong.fullname" . }}-{{ .Values.manager.component }}.{{ .Release.Namespace }}.svc.cluster.local"
- port={{ .Values.manager.ports.webPort }}
+ port={{ .Values.manager.containerPort }}
until [ $(nc -z -w 5 $host $port; echo $?) -eq 0 ]
do
echo "waiting for $replica to be ready"
@@ -67,9 +67,9 @@ spec:
- name: MANAGER_OPENAPI_IP
value: {{ include "inlong.manager.hostname" . | quote }}
- name: MANAGER_OPENAPI_PORT
- value: {{ .Values.dataproxy.managerOpenApiPort }}
+ value: {{ .Values.manager.containerPort | quote }}
- name: AUDIT_PROXY_URL
- value: {{ include "inlong.audit.hostname" . | quote }}:{{ .Values.audit.ports.webPort }}
+ value: "{{ template "inlong.audit.hostname" . }}:{{ .Values.audit.ports.webPort }}"
{{- range $key, $value := .Values.dataproxy.env }}
- name: {{ $key }}
value: {{ $value | quote }}
diff --git a/docker/kubernetes/templates/manager-service.yaml b/docker/kubernetes/templates/manager-service.yaml
index 57b7634..6f32283 100644
--- a/docker/kubernetes/templates/manager-service.yaml
+++ b/docker/kubernetes/templates/manager-service.yaml
@@ -27,7 +27,7 @@ spec:
type: ClusterIP
ports:
- name: {{ .Values.manager.component }}-port
- port: {{ .Values.manager.ports.webPort }}
+ port: {{ .Values.manager.containerPort }}
selector:
{{- include "inlong.matchLabels" . | nindent 4 }}
component: {{ .Values.manager.component }}
diff --git a/docker/kubernetes/templates/mysql-pvc.yaml b/docker/kubernetes/templates/mysql-pvc.yaml
index 4f87cd2..64433c0 100644
--- a/docker/kubernetes/templates/mysql-pvc.yaml
+++ b/docker/kubernetes/templates/mysql-pvc.yaml
@@ -26,7 +26,7 @@ metadata:
{{- include "inlong.commonLabels" . | nindent 4 }}
component: {{ .Values.mysql.component }}
spec:
- aaccessModes: [ "ReadWriteOnce" ]
+ accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storageClassName: {{ .Values.volumes.storageClassName | quote }}
diff --git a/docker/kubernetes/templates/tubemq-manager-statefulset.yaml b/docker/kubernetes/templates/tubemq-manager-statefulset.yaml
index 7e3c595..ba6f943 100644
--- a/docker/kubernetes/templates/tubemq-manager-statefulset.yaml
+++ b/docker/kubernetes/templates/tubemq-manager-statefulset.yaml
@@ -92,7 +92,7 @@ spec:
name: {{ template "inlong.fullname" . }}-{{ .Values.mysql.component }}
key: mysql-password
- name: TUBE_MASTER_IP
- value: {{ template "inlong.tubemqMaster.hostname" . }}:{{ .Values.tubemqMaster.ports.rpcPort }}
+ value: "{{ template "inlong.tubemqMaster.hostname" . }}:{{ .Values.tubemqMaster.ports.rpcPort }}"
{{- range $key, $value := .Values.tubemqManager.env }}
- name: {{ $key }}
value: {{ $value | quote }}
diff --git a/docker/kubernetes/values.yaml b/docker/kubernetes/values.yaml
index a7cbe2c..51d7fa3 100644
--- a/docker/kubernetes/values.yaml
+++ b/docker/kubernetes/values.yaml
@@ -68,12 +68,9 @@ agent:
requests:
cpu: 1
memory: "1Gi"
- ports:
- agent: 8008
- managerOpenApi: ${manager.containerPort}
- dataProxy: ${dataproxy.containerPort}
+ containerPort: 8008
env:
- AGENT_JVM_HEAP_OPTS: >
+ AGENT_JVM_HEAP_OPTS: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0
@@ -102,9 +99,8 @@ dataproxy:
cpu: 1
memory: "1Gi"
containerPort: 46801
- managerOpenApiPort: ${manager.containerPort}
env:
- DATAPROXY_JVM_HEAP_OPTS: >
+ DATAPROXY_JVM_HEAP_OPTS: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0
@@ -119,7 +115,7 @@ tubemqManager:
memory: "1Gi"
containerPort: 8089
env:
- TUBE_MANAGER_JVM_HEAP_OPTS: >
+ TUBE_MANAGER_JVM_HEAP_OPTS: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0
@@ -133,12 +129,11 @@ manager:
requests:
cpu: 1
memory: "1Gi"
- ports:
- webPort: 8083
+ containerPort: 8083
username: "root"
password: "inlong"
env:
- MANAGER_JVM_HEAP_OPTS: >
+ MANAGER_JVM_HEAP_OPTS: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0
@@ -156,7 +151,7 @@ audit:
ports:
webPort: 10081
env:
- AUDIT_JVM_HEAP_OPTS: >
+ AUDIT_JVM_HEAP_OPTS: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0
@@ -256,7 +251,7 @@ tubemqMaster:
usePolicy: true
maxUnavailable: 1
env:
- MASTER_JVM_SIZE: >
+ MASTER_JVM_SIZE: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0
@@ -299,7 +294,7 @@ tubemqBroker:
usePolicy: true
maxUnavailable: 1
env:
- BROKER_JVM_SIZE: >
+ BROKER_JVM_SIZE: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=40.0
-XX:MaxRAMPercentage=80.0