From 8799c4b5135e8693ad42bf5e6a42150155907b5c Mon Sep 17 00:00:00 2001 From: alexiseichst <45386670+alexiseichst@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:53:19 +0200 Subject: [PATCH 1/5] Fix(web.yaml.j2): Add the possibility to have more than one annotation. --- roles/installer/templates/deployments/web.yaml.j2 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/roles/installer/templates/deployments/web.yaml.j2 b/roles/installer/templates/deployments/web.yaml.j2 index 64b32177a..66d76d4e0 100644 --- a/roles/installer/templates/deployments/web.yaml.j2 +++ b/roles/installer/templates/deployments/web.yaml.j2 @@ -44,11 +44,12 @@ spec: ] %} checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | sha1 }}" {% endfor %} -{% if web_annotations %} - {{ web_annotations | indent(width=8) }} -{% elif annotations %} - {{ annotations | indent(width=8) }} -{% endif %} +{% for annotation in web_annotations %} + {{ annotation | indent(width=8) }} +{% endfor %} +{% for annotation in annotations %} + {{ annotation | indent(width=8) }} +{% endfor %} spec: {% if uwsgi_listen_queue_size is defined and uwsgi_listen_queue_size|int > 128 %} securityContext: From 542123e0a6d63dce712310d88f0841f430c454d1 Mon Sep 17 00:00:00 2001 From: alexiseichst <45386670+alexiseichst@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:56:45 +0200 Subject: [PATCH 2/5] Typo fix --- roles/installer/templates/deployments/web.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/installer/templates/deployments/web.yaml.j2 b/roles/installer/templates/deployments/web.yaml.j2 index 66d76d4e0..af25de3f6 100644 --- a/roles/installer/templates/deployments/web.yaml.j2 +++ b/roles/installer/templates/deployments/web.yaml.j2 @@ -47,7 +47,7 @@ spec: {% for annotation in web_annotations %} {{ annotation | indent(width=8) }} {% endfor %} -{% for annotation in annotations %} +{% for annotation in annotations %} {{ annotation | indent(width=8) }} {% endfor %} spec: From 5930ce28ac0a7c9720ddc3aa17cb82246f81b945 Mon Sep 17 00:00:00 2001 From: alexiseichst <45386670+alexiseichst@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:51:39 +0200 Subject: [PATCH 3/5] Update web.yaml.j2 --- roles/installer/templates/deployments/web.yaml.j2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roles/installer/templates/deployments/web.yaml.j2 b/roles/installer/templates/deployments/web.yaml.j2 index af25de3f6..bca188304 100644 --- a/roles/installer/templates/deployments/web.yaml.j2 +++ b/roles/installer/templates/deployments/web.yaml.j2 @@ -44,11 +44,13 @@ spec: ] %} checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | sha1 }}" {% endfor %} -{% for annotation in web_annotations %} - {{ annotation | indent(width=8) }} -{% endfor %} -{% for annotation in annotations %} +{% set combined_annotations = web_annotations + annotations %} +{% set seen = [] %} +{% for annotation in combined_annotations %} + {% if annotation not in seen %} {{ annotation | indent(width=8) }} + {% do seen.append(annotation) %} + {% endif %} {% endfor %} spec: {% if uwsgi_listen_queue_size is defined and uwsgi_listen_queue_size|int > 128 %} From 19b3142caf1c4d6a8d3de5d4d299c23dbe2f948c Mon Sep 17 00:00:00 2001 From: alexiseichst <45386670+alexiseichst@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:53:19 +0200 Subject: [PATCH 4/5] feat(web.yaml.j2): Add the possibility to have more than one annotation. Typo fix Update web.yaml.j2 Auteur : alexiseichst <45386670+alexiseichst@users.noreply.github.com> Date : Thu Apr 11 15:53:19 2024 +0200 --- roles/installer/templates/deployments/web.yaml.j2 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/installer/templates/deployments/web.yaml.j2 b/roles/installer/templates/deployments/web.yaml.j2 index 64b32177a..bca188304 100644 --- a/roles/installer/templates/deployments/web.yaml.j2 +++ b/roles/installer/templates/deployments/web.yaml.j2 @@ -44,11 +44,14 @@ spec: ] %} checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | sha1 }}" {% endfor %} -{% if web_annotations %} - {{ web_annotations | indent(width=8) }} -{% elif annotations %} - {{ annotations | indent(width=8) }} -{% endif %} +{% set combined_annotations = web_annotations + annotations %} +{% set seen = [] %} +{% for annotation in combined_annotations %} + {% if annotation not in seen %} + {{ annotation | indent(width=8) }} + {% do seen.append(annotation) %} + {% endif %} +{% endfor %} spec: {% if uwsgi_listen_queue_size is defined and uwsgi_listen_queue_size|int > 128 %} securityContext: From 7c1ddf85b7cb6849e99afe4ba45b3da73c57f68e Mon Sep 17 00:00:00 2001 From: Robin Segura Date: Fri, 12 Apr 2024 09:51:14 +0200 Subject: [PATCH 5/5] feat(task.yaml.j2): Add the possibility to have more than one annotation. Signed-off-by: Robin Segura --- roles/installer/templates/deployments/task.yaml.j2 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/installer/templates/deployments/task.yaml.j2 b/roles/installer/templates/deployments/task.yaml.j2 index 29da6f511..259044665 100644 --- a/roles/installer/templates/deployments/task.yaml.j2 +++ b/roles/installer/templates/deployments/task.yaml.j2 @@ -44,11 +44,14 @@ spec: ] %} checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | sha1 }}" {% endfor %} -{% if task_annotations %} - {{ task_annotations | indent(width=8) }} -{% elif annotations %} - {{ annotations | indent(width=8) }} -{% endif %} +{% set combined_annotations = web_annotations + annotations %} +{% set seen = [] %} +{% for annotation in combined_annotations %} + {% if annotation not in seen %} + {{ annotation | indent(width=8) }} + {% do seen.append(annotation) %} + {% endif %} +{% endfor %} spec: serviceAccountName: '{{ ansible_operator_meta.name }}' {% if image_pull_secret is defined %}