SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
helm: roll master pods when master config changes (#11331)
Evans Mungaia9ecfeef4566
diff --git a/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml b/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yamlindex ba1fcfdfc6..9f4a92e754 100644--- a/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml+++ b/k8s/charts/seaweedfs/templates/all-in-one/all-in-one-deployment.yaml@@ -37,20 +37,17 @@ spec:{{- with .Values.allInOne.podLabels }}{{- toYaml . | nindent 8 }}{{- end }}+ {{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.allInOne.podAnnotations | default dict) }}+ {{- $existingS3ConfigSecret := or .Values.allInOne.s3.existingConfigSecret .Values.s3.existingConfigSecret .Values.filer.s3.existingConfigSecret }}+ {{- if $existingS3ConfigSecret }}+ {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace $existingS3ConfigSecret) | default dict }}+ {{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}+ {{- else }}+ {{- $_ := set $podAnnotations "checksum/s3config" (include (print .Template.BasePath "/s3/s3-secret.yaml") . | sha256sum) }}+ {{- end }}+ {{- $_ := set $podAnnotations "checksum/master-config" (include (print .Template.BasePath "/master/master-configmap.yaml") . | sha256sum) }}annotations:- {{- with .Values.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}- {{- with .Values.allInOne.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}- {{- $existingS3ConfigSecret := or .Values.allInOne.s3.existingConfigSecret .Values.s3.existingConfigSecret .Values.filer.s3.existingConfigSecret }}- {{- if $existingS3ConfigSecret }}- {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace $existingS3ConfigSecret) | default dict }}- checksum/s3config: {{ $configSecret | toYaml | sha256sum }}- {{- else }}- checksum/s3config: {{ include (print .Template.BasePath "/s3/s3-secret.yaml") . | sha256sum }}- {{- end }}+ {{- toYaml $podAnnotations | nindent 8 }}spec:restartPolicy: {{ default .Values.global.seaweedfs.restartPolicy .Values.allInOne.restartPolicy }}{{- if .Values.allInOne.affinity }}diff --git a/k8s/charts/seaweedfs/templates/filer/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer/filer-statefulset.yamlindex e505faf1c6..5ded974699 100644--- a/k8s/charts/seaweedfs/templates/filer/filer-statefulset.yaml+++ b/k8s/charts/seaweedfs/templates/filer/filer-statefulset.yaml@@ -43,19 +43,15 @@ spec:{{- with .Values.filer.podLabels }}{{- toYaml . | nindent 8 }}{{- end }}- annotations:- {{- with .Values.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}- {{- with .Values.filer.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}+ {{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.filer.podAnnotations | default dict) }}{{- if .Values.filer.s3.existingConfigSecret }}- {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace .Values.filer.s3.existingConfigSecret) | default dict }}- checksum/s3config: {{ $configSecret | toYaml | sha256sum }}+ {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace .Values.filer.s3.existingConfigSecret) | default dict }}+ {{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}{{- else }}- checksum/s3config: {{ include (print .Template.BasePath "/s3/s3-secret.yaml") . | sha256sum }}+ {{- $_ := set $podAnnotations "checksum/s3config" (include (print .Template.BasePath "/s3/s3-secret.yaml") . | sha256sum) }}{{- end }}+ annotations:+ {{- toYaml $podAnnotations | nindent 8 }}spec:restartPolicy: {{ default .Values.global.seaweedfs.restartPolicy .Values.filer.restartPolicy }}{{- if .Values.filer.affinity }}diff --git a/k8s/charts/seaweedfs/templates/master/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master/master-statefulset.yamlindex 914f0dfd11..89e99d4700 100644--- a/k8s/charts/seaweedfs/templates/master/master-statefulset.yaml+++ b/k8s/charts/seaweedfs/templates/master/master-statefulset.yaml@@ -43,13 +43,10 @@ spec:{{- with .Values.master.podLabels }}{{- toYaml . | nindent 8 }}{{- end }}+ {{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.master.podAnnotations | default dict) }}+ {{- $_ := set $podAnnotations "checksum/master-config" (include (print .Template.BasePath "/master/master-configmap.yaml") . | sha256sum) }}annotations:- {{ with .Values.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}- {{- with .Values.master.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}+ {{- toYaml $podAnnotations | nindent 8 }}spec:restartPolicy: {{ default .Values.global.seaweedfs.restartPolicy .Values.master.restartPolicy }}{{- if .Values.master.affinity }}diff --git a/k8s/charts/seaweedfs/templates/s3/s3-deployment.yaml b/k8s/charts/seaweedfs/templates/s3/s3-deployment.yamlindex 756607cea0..a8126830c8 100644--- a/k8s/charts/seaweedfs/templates/s3/s3-deployment.yaml+++ b/k8s/charts/seaweedfs/templates/s3/s3-deployment.yaml@@ -35,19 +35,15 @@ spec:{{- with .Values.s3.podLabels }}{{- toYaml . | nindent 8 }}{{- end }}- annotations:- {{ with .Values.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}- {{- with .Values.s3.podAnnotations }}- {{- toYaml . | nindent 8 }}- {{- end }}+ {{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.s3.podAnnotations | default dict) }}{{- if .Values.s3.existingConfigSecret }}- {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace .Values.s3.existingConfigSecret) | default dict }}- checksum/s3config: {{ $configSecret | toYaml | sha256sum }}+ {{- $configSecret := (lookup "v1" "Secret" .Release.Namespace .Values.s3.existingConfigSecret) | default dict }}+ {{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}{{- else }}- checksum/s3config: {{ include (print .Template.BasePath "/s3/s3-secret.yaml") . | sha256sum }}+ {{- $_ := set $podAnnotations "checksum/s3config" (include (print .Template.BasePath "/s3/s3-secret.yaml") . | sha256sum) }}{{- end }}+ annotations:+ {{- toYaml $podAnnotations | nindent 8 }}spec:restartPolicy: {{ default .Values.global.seaweedfs.restartPolicy .Values.s3.restartPolicy }}{{- if .Values.s3.affinity }}diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yamlindex 47db704401..40d77e8972 100644--- a/k8s/charts/seaweedfs/values.yaml+++ b/k8s/charts/seaweedfs/values.yaml@@ -190,6 +190,8 @@ master:podLabels: {}# Annotations to be added to the master pods+ # The chart sets checksum/master-config on master pods; other checksum/* keys+ # can be used for custom rollouts.podAnnotations: {}# Annotations to be added to the master resources@@ -773,6 +775,8 @@ filer:podLabels: {}# Annotations to be added to the filer pods+ # The chart sets checksum/s3config on filer pods; other checksum/* keys can be+ # used for custom rollouts.podAnnotations: {}# Annotations to be added to the filer resource@@ -1078,6 +1082,8 @@ s3:podLabels: {}# Annotations to be added to the s3 pods+ # The chart sets checksum/s3config on s3 pods; other checksum/* keys can be+ # used for custom rollouts.podAnnotations: {}# Annotations to be added to the s3 resources@@ -1788,6 +1794,8 @@ allInOne:initContainers: "" # Init containerssidecars: "" # Sidecar containersannotations: {} # Annotations for the deployment+ # The chart sets checksum/master-config and checksum/s3config on all-in-one+ # pods; other checksum/* keys can be used for custom rollouts.podAnnotations: {} # Annotations for the podspodLabels: {} # Labels for the pods@@ -1922,6 +1930,9 @@ certificates:# Labels to be added to all the created podspodLabels: {}# Annotations to be added to all the created pods+# The chart sets checksum/master-config and checksum/s3config on pods whose+# rendered ConfigMaps or Secrets should trigger rollouts. Other checksum/* keys+# can be used for custom rollout annotations.podAnnotations: {}networkPolicy: