From d2fd705da785a1c043766fbaaf259cf077bbe57e Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Tue, 17 May 2022 08:53:16 -0300 Subject: [PATCH] Fix pod antiaffinity --- .../saberes/v0.1.0/templates/deployment.yaml | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/charts/saberes/v0.1.0/templates/deployment.yaml b/charts/saberes/v0.1.0/templates/deployment.yaml index 2911b4d..32d7d98 100644 --- a/charts/saberes/v0.1.0/templates/deployment.yaml +++ b/charts/saberes/v0.1.0/templates/deployment.yaml @@ -91,17 +91,19 @@ spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - {{ include "saberes.name" . }} - - key: app.kubernetes.io/instance - operator: In - values: - - {{ .Release.Name }} - topologyKey: "kubernetes.io/hostname" + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - {{ include "saberes.name" . }} + - key: app.kubernetes.io/instance + operator: In + values: + - {{ .Release.Name }} + topologyKey: "kubernetes.io/hostname" {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }}