Add ability to override annotations independently

- add web_annotations to override annotations for web pods
- add task_annotations to override annotations for task pods
This commit is contained in:
Lila
2023-04-11 14:51:01 -04:00
committed by Hao Liu
parent 0c2f45569c
commit e54215863c
5 changed files with 35 additions and 3 deletions

View File

@@ -188,6 +188,18 @@ web_affinity: {}
# my.annotation/2: value2
annotations: ''
# Override annotations to awx task pods. Specify as literal block. E.g.:
# task_annotations: |
# my.task-annotation/1: value
# my.task-annotation/2: value2
task_annotations: ''
# Override annotations to awx web pods. Specify as literal block. E.g.:
# web_annotations: |
# my.web-annotation/1: value
# my.web-annotation/2: value2
web_annotations: ''
admin_user: admin
admin_email: test@example.com

View File

@@ -43,7 +43,9 @@ spec:
] %}
checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | sha1 }}"
{% endfor %}
{% if annotations %}
{% if task_annotations %}
{{ task_annotations | indent(width=8) }}
{% elif annotations %}
{{ annotations | indent(width=8) }}
{% endif %}
spec:

View File

@@ -44,7 +44,9 @@ spec:
] %}
checksum-secret-{{ secret }}: "{{ lookup('ansible.builtin.vars', secret, default='')["resources"][0]["data"] | default('') | md5 }}"
{% endfor %}
{% if annotations %}
{% if web_annotations %}
{{ web_annotations | indent(width=8) }}
{% elif annotations %}
{{ annotations | indent(width=8) }}
{% endif %}
spec: