This is an automated email from the ASF dual-hosted git repository.
chufenggao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 11d1df2f32 [Improvement][helm] configmap changes automatically trigger
restart (#14657)
11d1df2f32 is described below
commit 11d1df2f326a426b6f62aea2a45dbce5722e7b5b
Author: Gallardot <[email protected]>
AuthorDate: Wed Aug 9 10:30:20 2023 +0800
[Improvement][helm] configmap changes automatically trigger restart (#14657)
* [Improvement][helm] configmap changes automatically trigger restarts
Signed-off-by: Gallardot <[email protected]>
* feat: add an optional parameter
Signed-off-by: Gallardot <[email protected]>
---------
Signed-off-by: Gallardot <[email protected]>
Co-authored-by: Eric Gao <[email protected]>
---
.../templates/deployment-dolphinscheduler-alert.yaml | 7 ++++++-
.../templates/deployment-dolphinscheduler-api.yaml | 7 ++++++-
.../templates/statefulset-dolphinscheduler-master.yaml | 7 ++++++-
.../templates/statefulset-dolphinscheduler-worker.yaml | 7 ++++++-
deploy/kubernetes/dolphinscheduler/values.yaml | 3 +++
5 files changed, 27 insertions(+), 4 deletions(-)
diff --git
a/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
b/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
index 7772943d82..ad1367a0d9 100644
---
a/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
+++
b/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
@@ -34,9 +34,14 @@ 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" . }}
diff --git
a/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
b/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
index 53e1949480..6b66cf5d9b 100644
---
a/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
+++
b/deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
@@ -34,9 +34,14 @@ 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" . }}
diff --git
a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
index 9eaf40ce62..f3846316ff 100644
---
a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
+++
b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
@@ -31,9 +31,14 @@ 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" . }}
diff --git
a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
index ba8a2f49de..237b70cc38 100644
---
a/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
+++
b/deploy/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
@@ -31,9 +31,14 @@ 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" . }}
diff --git a/deploy/kubernetes/dolphinscheduler/values.yaml
b/deploy/kubernetes/dolphinscheduler/values.yaml
index adcd1c9d71..83b869ffc7 100644
--- a/deploy/kubernetes/dolphinscheduler/values.yaml
+++ b/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