From 10ca6d951557357ef0cf337875e1079d582b1a10 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 26ba19598..1b9f43eb8 100644 --- a/helm/core/templates/controller-deployment.yaml +++ b/helm/core/templates/controller-deployment.yaml @@ -301,6 +301,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 e5ebea4eb..d4f7360f2 100644 --- a/helm/core/values.yaml +++ b/helm/core/values.yaml @@ -524,6 +524,8 @@ gateway: affinity: {} + topologySpreadConstraints: [] + # -- If specified, the gateway will act as a network gateway for the given network. networkGateway: "" @@ -631,6 +633,8 @@ controller: affinity: {} + topologySpreadConstraints: [] + autoscaling: enabled: false minReplicas: 1