You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2022/10/12 01:58:14 UTC
[incubator-linkis] branch dev-1.3.0 updated: use STS to manager cg-engineconnmanager service (#3616)
This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev-1.3.0
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
new 326cad8a7 use STS to manager cg-engineconnmanager service (#3616)
326cad8a7 is described below
commit 326cad8a78168112937ca04030f61ad452e2b740
Author: Aaron Lin <51...@users.noreply.github.com>
AuthorDate: Wed Oct 12 09:58:10 2022 +0800
use STS to manager cg-engineconnmanager service (#3616)
* use STS to manager cg-engineconnmanager service
---
.../templates/linkis-cg-engineconnmanager.yaml | 55 +++++++++++++---------
linkis-dist/helm/scripts/create-kind-cluster.sh | 8 ++--
2 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/linkis-dist/helm/charts/linkis/templates/linkis-cg-engineconnmanager.yaml b/linkis-dist/helm/charts/linkis/templates/linkis-cg-engineconnmanager.yaml
index 14f810a1f..b87d0eb2e 100644
--- a/linkis-dist/helm/charts/linkis/templates/linkis-cg-engineconnmanager.yaml
+++ b/linkis-dist/helm/charts/linkis/templates/linkis-cg-engineconnmanager.yaml
@@ -59,7 +59,7 @@ spec:
publishNotReadyAddresses: true
---
apiVersion: apps/v1
-kind: Deployment
+kind: StatefulSet
metadata:
name: {{ include "linkis.fullname" . }}-cg-engineconnmanager
labels:
@@ -71,22 +71,50 @@ metadata:
{{- toYaml .Values.cgEngineConnManager.annotations | nindent 4 }}
{{- end }}
spec:
- replicas: {{ .Values.cgEngineConnManager.replicas }}
+ serviceName: {{ include "linkis.fullname" . }}-cg-engineconnmanager-headless
selector:
matchLabels:
{{- include "linkis.cgEngineConnManager.selectorLabels" . | nindent 6 }}
app: {{ include "linkis.fullname" . }}-cg-engineconnmanager
+ replicas: {{ .Values.cgEngineConnManager.replicas }}
+ podManagementPolicy: {{ .Values.cgEngineConnManager.podManagementPolicy }}
+ updateStrategy:
+ type: {{ .Values.cgEngineConnManager.updateStrategy }}
template:
metadata:
- {{- with .Values.cgEngineConnManager.annotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
labels:
app: {{ include "linkis.fullname" . }}-cg-engineconnmanager
version: {{ .Chart.AppVersion }}
{{- include "linkis.cgEngineConnManager.selectorLabels" . | nindent 8 }}
+ {{- with .Values.cgEngineConnManager.annotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
spec:
+ {{- if .Values.schedulerName }}
+ schedulerName: "{{ .Values.schedulerName }}"
+ {{- end }}
+ {{- if .Values.podSecurityContext }}
+ securityContext:
+{{ toYaml .Values.podSecurityContext | indent 8 }}
+ {{- end }}
+ {{- if or .Values.serviceAccount.create .Values.serviceAccount.name }}
+ serviceAccountName: "{{ template "linkis.serviceAccountName" . }}"
+ {{- end }}
+ automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
+ terminationGracePeriodSeconds: {{ .Values.mgEureka.terminationGracePeriod }}
+ {{- with .Values.cgEngineConnManager.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.cgEngineConnManager.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.cgEngineConnManager.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
subdomain: {{ include "linkis.fullname" . }}-cg-engineconnmanager-headless
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
@@ -128,9 +156,6 @@ spec:
- configMap:
name: {{ .Values.linkis.deps.spark.configMapName }}
{{- end }}
- serviceAccountName: {{ include "linkis.serviceAccountName" . }}
- securityContext:
- {{- toYaml .Values.cgEngineConnManager.podSecurityContext | nindent 8 }}
containers:
- name: "engineconnmanager"
securityContext:
@@ -210,15 +235,3 @@ spec:
mountPath: {{ .Values.linkis.locations.commonDir }}
resources:
{{- toYaml .Values.cgEngineConnManager.resources | nindent 12 }}
- {{- with .Values.cgEngineConnManager.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.cgEngineConnManager.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.cgEngineConnManager.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
diff --git a/linkis-dist/helm/scripts/create-kind-cluster.sh b/linkis-dist/helm/scripts/create-kind-cluster.sh
index 1d9804f8e..580419a64 100755
--- a/linkis-dist/helm/scripts/create-kind-cluster.sh
+++ b/linkis-dist/helm/scripts/create-kind-cluster.sh
@@ -29,15 +29,15 @@ echo "# Creating KinD cluster ..."
KIND_CLUSTER_HOST_PATH=${TMP_DIR}/data
# Shared storage of some common dependent packages such as mysql-connector-java-*.jar
-# Values.linkis.locations.commonDir -> kind docker /data/common -> vm ${KIND_COMMON_PATH}
-KIND_COMMON_PATH=/data/common/
+# Values.linkis.locations.commonDir -> kind docker /opt/data/common -> vm ${KIND_COMMON_PATH}
+KIND_COMMON_PATH=/opt/data/common/
mkdir -p ${KIND_CLUSTER_HOST_PATH}
# create kind cluster conf
KIND_CLUSTER_CONF_TPL=${RESOURCE_DIR}/kind-cluster.yaml
KIND_CLUSTER_CONF_FILE=${TMP_DIR}/kind-cluster.yaml
-KIND_CLUSTER_HOST_PATH=${KIND_CLUSTER_HOST_PATH} envsubst < ${KIND_CLUSTER_CONF_TPL} > ${KIND_CLUSTER_CONF_FILE}
-KIND_COMMON_PATH=${KIND_COMMON_PATH} envsubst < ${KIND_CLUSTER_CONF_TPL} > ${KIND_CLUSTER_CONF_FILE}
+KIND_COMMON_PATH=${KIND_COMMON_PATH} KIND_CLUSTER_HOST_PATH=${KIND_CLUSTER_HOST_PATH} \
+envsubst < ${KIND_CLUSTER_CONF_TPL} > ${KIND_CLUSTER_CONF_FILE}
echo "- kind cluster config: ${KIND_CLUSTER_CONF_FILE}"
cat ${KIND_CLUSTER_CONF_FILE}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org