Browse Source

[Improvement][helm] configmap changes automatically trigger restart (#14657)

* [Improvement][helm] configmap changes automatically trigger restarts

Signed-off-by: Gallardot <gallardot@apache.org>

* feat: add an optional parameter

Signed-off-by: Gallardot <gallardot@apache.org>

---------

Signed-off-by: Gallardot <gallardot@apache.org>
Co-authored-by: Eric Gao <ericgao.apache@gmail.com>
3.2.1-prepare
Gallardot 1 year ago committed by GitHub
parent
commit
11d1df2f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
  2. 7
      deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
  3. 7
      deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
  4. 7
      deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
  5. 3
      deploy/kubernetes/dolphinscheduler/values.yaml

7
deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml

@ -34,10 +34,15 @@ spec:
metadata:
labels:
{{- include "dolphinscheduler.alert.labels" . | nindent 8 }}
{{- if .Values.alert.annotations }}
{{- if or .Values.alert.annotations .Values.conf.auto }}
annotations:
{{- if .Values.conf.auto }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.alert.annotations }}
{{- toYaml .Values.alert.annotations | nindent 8 }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ template "dolphinscheduler.fullname" . }}
{{- if .Values.alert.affinity }}

7
deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml

@ -34,10 +34,15 @@ spec:
metadata:
labels:
{{- include "dolphinscheduler.api.labels" . | nindent 8 }}
{{- if .Values.api.annotations }}
{{- if or .Values.api.annotations .Values.conf.auto }}
annotations:
{{- if .Values.conf.auto }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.api.annotations }}
{{- toYaml .Values.api.annotations | nindent 8 }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ template "dolphinscheduler.fullname" . }}
{{- if .Values.api.affinity }}

7
deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml

@ -31,10 +31,15 @@ spec:
metadata:
labels:
{{- include "dolphinscheduler.master.labels" . | nindent 8 }}
{{- if .Values.master.annotations }}
{{- if or .Values.master.annotations .Values.conf.auto }}
annotations:
{{- if .Values.conf.auto }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.master.annotations }}
{{- toYaml .Values.master.annotations | nindent 8 }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ template "dolphinscheduler.fullname" . }}
{{- if .Values.master.affinity }}

7
deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml

@ -31,10 +31,15 @@ spec:
metadata:
labels:
{{- include "dolphinscheduler.worker.labels" . | nindent 8 }}
{{- if .Values.worker.annotations }}
{{- if or .Values.worker.annotations .Values.conf.auto }}
annotations:
{{- if .Values.conf.auto }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.worker.annotations }}
{{- toYaml .Values.worker.annotations | nindent 8 }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ template "dolphinscheduler.fullname" . }}
{{- if .Values.worker.affinity }}

3
deploy/kubernetes/dolphinscheduler/values.yaml

@ -141,6 +141,9 @@ security:
truststorepassword: ""
conf:
# auto restart, if true, all components will be restarted automatically after the common configuration is updated. if false, you need to restart the components manually. default is false
auto: false
# common configuration
common:
# user data local directory path, please make sure the directory exists and have read write permissions
data.basedir.path: /tmp/dolphinscheduler

Loading…
Cancel
Save