From 735e73d2e01c55837a6d3440d58af28409415aac Mon Sep 17 00:00:00 2001 From: Patrick Vickery Date: Tue, 23 Jul 2024 10:04:41 -0400 Subject: [PATCH] Allow topologySpreadConstraints for unleash --- charts/unleash/templates/deployment.yaml | 6 ++++++ charts/unleash/values.yaml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/charts/unleash/templates/deployment.yaml b/charts/unleash/templates/deployment.yaml index af4068e..36ee6b5 100644 --- a/charts/unleash/templates/deployment.yaml +++ b/charts/unleash/templates/deployment.yaml @@ -176,6 +176,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range . }} + - {{ toYaml . | nindent 8 | trim }} + {{- end }} + {{- end }} {{- with .Values.hostAliases }} hostAliases: {{- toYaml . | nindent 8 }} diff --git a/charts/unleash/values.yaml b/charts/unleash/values.yaml index ce0605a..f5b788a 100644 --- a/charts/unleash/values.yaml +++ b/charts/unleash/values.yaml @@ -242,3 +242,8 @@ podDisruptionBudget: enabled: false minAvailable: maxUnavailable: 1 + +topologySpreadConstraints: {} + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule