From 299dd9047ae623394b4c1121191aacf3308dfb33 Mon Sep 17 00:00:00 2001 From: Rajith Rajan Date: Thu, 23 Oct 2025 08:09:46 +0000 Subject: [PATCH] Fix: Add affinity to deployment template --- .../overwhelm-controller-manager-deployment.yaml | 4 ++++ charts/overwhelm/values.yaml | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml b/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml index e357c80..81f2ddf 100755 --- a/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml +++ b/charts/overwhelm/templates/overwhelm-controller-manager-deployment.yaml @@ -17,6 +17,10 @@ spec: labels: {{ toYaml .Values.deployment.labels | indent 8 }} spec: + {{- with .Values.deployment.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if and .Values.global .Values.global.imagePullSecrets }} imagePullSecrets: {{- range .Values.global.imagePullSecrets }} diff --git a/charts/overwhelm/values.yaml b/charts/overwhelm/values.yaml index f306847..463c7d4 100644 --- a/charts/overwhelm/values.yaml +++ b/charts/overwhelm/values.yaml @@ -17,4 +17,15 @@ deployment: requests: cpu: 128m memory: 64Mi - + affinity: {} + # podAntiAffinity: + # preferredDuringSchedulingIgnoredDuringExecution: + # - podAffinityTerm: + # labelSelector: + # matchExpressions: + # - key: control-plane + # operator: In + # values: + # - controller-manager + # topologyKey: kubernetes.io/hostname + # weight: 100