From 3c16b2c75a34a4de440deb279b8d43cf9b9cb97a Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:44:27 +0100 Subject: [PATCH] BC-5423 - make affinity rules optional --- .../h5p-staticfiles-server-core/templates/deployment.yml.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 b/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 index 8ac0646..5607ccb 100644 --- a/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 +++ b/ansible/roles/h5p-staticfiles-server-core/templates/deployment.yml.j2 @@ -78,6 +78,7 @@ spec: requests: cpu: {{ H5P_STATICFIILES_SERVER_CPU_REQUESTS|default("100m", true) }} memory: {{ H5P_STATICFIILES_SERVER_MEMORY_REQUESTS|default("128Mi", true) }} +{% if AFFINITY_ENABLE is defined and AFFINITY_ENABLE|bool %} affinity: podAffinity: preferredDuringSchedulingIgnoredDuringExecution: @@ -113,3 +114,4 @@ spec: values: - h5p-staticfiles-server topologyKey: "topology.kubernetes.io/zone" +{% endif %}