aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Tudan <Gregor@tudan.de>2024-07-11 17:56:44 +0200
committerGitHub <noreply@github.com>2024-07-11 08:56:44 -0700
commitb62f7c512267cfe379100fa283bbe4b0682e5dc9 (patch)
treea8e8dcb9b1ce78575c4f6157944e63215b0782ca
parentde60f383de3202b2e5aaa57b9766376cd5b9b129 (diff)
downloadseaweedfs-b62f7c512267cfe379100fa283bbe4b0682e5dc9.tar.xz
seaweedfs-b62f7c512267cfe379100fa283bbe4b0682e5dc9.zip
helm: restart filer when the s3-configuration changes (#5768)
Restarts the filer when the s3-config inside the secret (existing or generated) changes
-rw-r--r--k8s/charts/seaweedfs/templates/filer-statefulset.yaml10
1 files changed, 8 insertions, 2 deletions
diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml
index 881c4868a..49b62e867 100644
--- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml
+++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml
@@ -32,19 +32,25 @@ spec:
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
- {{ with .Values.podLabels }}
+ {{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.filer.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
- {{ with .Values.podAnnotations }}
+ {{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.filer.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- if .Values.filer.s3.existingConfigSecret }}
+ {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace .Values.filer.s3.existingConfigSecret) | default dict }}
+ checksum/s3config: {{ $configSecret | toYaml | sha256sum }}
+ {{- else }}
+ checksum/s3config: {{ include (print .Template.BasePath "/s3-secret.yaml") . | sha256sum }}
+ {{- end }}
spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.filer.restartPolicy }}
{{- if .Values.filer.affinity }}