From 3f9002d421213557d85a75489b22bd5824dd76cf Mon Sep 17 00:00:00 2001 From: Dominic DePasquale <7384087+domdepasquale@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:19:36 -0500 Subject: [PATCH] fix preferredDuringSchedulingIgnoredDuringExecution (#66) --- charts/application-core/Chart.yaml | 2 +- .../application-core/templates/deployment.yaml | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/charts/application-core/Chart.yaml b/charts/application-core/Chart.yaml index 8541dca..6b735a3 100644 --- a/charts/application-core/Chart.yaml +++ b/charts/application-core/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.0.0 +version: 2.0.1 maintainers: - name: Dominic DePasquale diff --git a/charts/application-core/templates/deployment.yaml b/charts/application-core/templates/deployment.yaml index 6b1e073..74d2e0c 100644 --- a/charts/application-core/templates/deployment.yaml +++ b/charts/application-core/templates/deployment.yaml @@ -127,13 +127,15 @@ spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - {{ include "application-core.fullname" . }} - topologyKey: "kubernetes.io/hostname" + - weight: 100 + podAffinityTerm: + topologyKey: "kubernetes.io/hostname" + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - {{ include "application-core.fullname" . }} topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone