From f732781b70ec540ad6a74c78ed4440ec3cc95253 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:52:24 +0100 Subject: [PATCH] BC-5423 - Make pod anti affinity rule configurable and optional --- ansible/roles/nuxt-client-core/templates/deployment.yml.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/nuxt-client-core/templates/deployment.yml.j2 b/ansible/roles/nuxt-client-core/templates/deployment.yml.j2 index 47eb7326ec5..ad36b430117 100644 --- a/ansible/roles/nuxt-client-core/templates/deployment.yml.j2 +++ b/ansible/roles/nuxt-client-core/templates/deployment.yml.j2 @@ -102,6 +102,7 @@ spec: namespaceSelector: {} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: +{% if ANIT_AFFINITY_NODEPOOL_ENABLE is defined and ANIT_AFFINITY_NODEPOOL_ENABLE|bool %} - weight: 10 podAffinityTerm: labelSelector: @@ -110,7 +111,8 @@ spec: operator: In values: - nuxtclient - topologyKey: "cloud.ionos.com/nodepool-name" + topologyKey: {{ ANIT_AFFINITY_NODEPOOL_TOPOLOGY_KEY }} +{% endif %} - weight: 20 podAffinityTerm: labelSelector: