From c7028bd7f25dafe7a4b8019c47d7ee63e5b5cf21 Mon Sep 17 00:00:00 2001 From: Wilson Wu Date: Fri, 26 Dec 2025 17:30:31 +0800 Subject: [PATCH] feat: add topology spread constraints for gateway and controller (#3171) Signed-off-by: Wilson Wu --- helm/core/templates/_pod.tpl | 4 ++++ helm/core/templates/controller-deployment.yaml | 4 ++++ helm/core/values.yaml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/helm/core/templates/_pod.tpl b/helm/core/templates/_pod.tpl index c87e4d3ef..a5e680384 100644 --- a/helm/core/templates/_pod.tpl +++ b/helm/core/templates/_pod.tpl @@ -250,6 +250,10 @@ template: tolerations: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.gateway.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 6 }} + {{- end }} volumes: - emptyDir: {} name: workload-socket diff --git a/helm/core/templates/controller-deployment.yaml b/helm/core/templates/controller-deployment.yaml index d39f13376..ec1f6e0db 100644 --- a/helm/core/templates/controller-deployment.yaml +++ b/helm/core/templates/controller-deployment.yaml @@ -289,6 +289,10 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.controller.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: - name: log emptyDir: {} diff --git a/helm/core/values.yaml b/helm/core/values.yaml index b1fc6b9f6..363a28dad 100644 --- a/helm/core/values.yaml +++ b/helm/core/values.yaml @@ -522,6 +522,8 @@ gateway: affinity: {} + topologySpreadConstraints: [] + # -- If specified, the gateway will act as a network gateway for the given network. networkGateway: "" @@ -629,6 +631,8 @@ controller: affinity: {} + topologySpreadConstraints: [] + autoscaling: enabled: false minReplicas: 1