feat(helm): add topology spread constraints configuration to StatefulSet (#3187)

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
Michael
2026-06-04 05:20:51 +02:00
committed by GitHub
parent 013b5b7966
commit 45e3c01857
3 changed files with 16 additions and 0 deletions
+2
View File
@@ -152,6 +152,8 @@ uer. `ClusterIssuer` or `Issuer`. |
| storageclass.pvcAnnotations.data | map | `{}` | Data pvc customized annotations. |
| storageclass.pvcAnnotations.logs | map | `{}` | Logs pvc customized annotations. |
| tolerations | list | `[]` | |
| topologySpreadConstraints.enabled | bool | `false` | Enable custom topology spread constraints on distributed-mode StatefulSet pods. |
| topologySpreadConstraints.constraints | list | `[]` | Raw `spec.template.spec.topologySpreadConstraints` entries applied to the distributed StatefulSet when enabled. |
| gatewayApi.enabled | bool | `false` | To enable/disable gateway api support. |
| gatewayApi.gatewayClass | string | `traefik` | Gateway class implementation. |
| gatewayApi.listeners.http.name | string | `web` | Gateway API http listener name. |
+4
View File
@@ -60,6 +60,10 @@ spec:
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
{{- if and .Values.topologySpreadConstraints.enabled .Values.topologySpreadConstraints.constraints }}
topologySpreadConstraints:
{{- toYaml .Values.topologySpreadConstraints.constraints | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
+10
View File
@@ -302,6 +302,16 @@ affinity:
topologyKey: kubernetes.io/hostname
nodeAffinity: {}
topologySpreadConstraints:
enabled: false
constraints: []
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: ScheduleAnyway
# labelSelector:
# matchLabels:
# app.kubernetes.io/name: rustfs
storageclass:
name: local-path
dataStorageSize: 256Mi