diff options
| author | Dominik Grygiel <dominik.grygiel@gmail.com> | 2024-10-15 23:18:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-15 14:18:21 -0700 |
| commit | 9dc47f6b9711dcb90b7fb099322bfa4b1cedbfc4 (patch) | |
| tree | cbfa61a471b2c8d3f9e6d32c4c014aba12b6a796 | |
| parent | e12b9ab7460aa635e32190e9f61f37fdc7b794f6 (diff) | |
| download | seaweedfs-9dc47f6b9711dcb90b7fb099322bfa4b1cedbfc4.tar.xz seaweedfs-9dc47f6b9711dcb90b7fb099322bfa4b1cedbfc4.zip | |
Support topologySpreadConstraints in helm chart (#6132)
4 files changed, 27 insertions, 0 deletions
diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml index d02099e50..657b37cf5 100644 --- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml @@ -57,6 +57,10 @@ spec: affinity: {{ tpl .Values.filer.affinity . | nindent 8 | trim }} {{- end }} + {{- with .Values.filer.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.filer.tolerations }} tolerations: {{ tpl .Values.filer.tolerations . | nindent 8 | trim }} diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml index 73d1f9fb3..ab3a3ca8d 100644 --- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml @@ -50,6 +50,10 @@ spec: affinity: {{ tpl .Values.master.affinity . | nindent 8 | trim }} {{- end }} + {{- with .Values.master.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.master.tolerations }} tolerations: {{ tpl .Values.master.tolerations . | nindent 8 | trim }} diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index e9194b485..5e6fa2999 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -43,6 +43,10 @@ spec: affinity: {{ tpl .Values.volume.affinity . | nindent 8 | trim }} {{- end }} + {{- with .Values.volume.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} restartPolicy: {{ default .Values.global.restartPolicy .Values.volume.restartPolicy }} {{- if .Values.volume.tolerations }} tolerations: diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index 94ac8b567..f450b8a84 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -166,6 +166,11 @@ master: app.kubernetes.io/component: master topologyKey: kubernetes.io/hostname + # Topology Spread Constraints Settings + # This should map directly to the value of the topologySpreadConstraints + # for a PodSpec. By Default no constraints are set. + topologySpreadConstraints: {} + # Toleration Settings for master pods # This should be a multi-line string matching the Toleration array # in a PodSpec. @@ -421,6 +426,11 @@ volume: app.kubernetes.io/component: volume topologyKey: kubernetes.io/hostname + # Topology Spread Constraints Settings + # This should map directly to the value of the topologySpreadConstraints + # for a PodSpec. By Default no constraints are set. + topologySpreadConstraints: {} + # Resource requests, limits, etc. for the server cluster placement. This # should map directly to the value of the resources field for a PodSpec, # formatted as a multi-line string. By default no direct resource request @@ -615,6 +625,11 @@ filer: app.kubernetes.io/component: filer topologyKey: kubernetes.io/hostname + # Topology Spread Constraints Settings + # This should map directly to the value of the topologySpreadConstraints + # for a PodSpec. By Default no constraints are set. + topologySpreadConstraints: {} + # updatePartition is used to control a careful rolling update of SeaweedFS # masters. updatePartition: 0 |
