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

@@ -186,7 +186,13 @@ spec:
description: Additional labels to apply to the service
type: string
annotations:
description: annotations for the pods
description: Common annotations for both Web and Task deployments.
type: string
task_annotations:
description: Task deployment annotations. This will override the general annotations parameter for the Task deployment.
type: string
web_annotations:
description: Web deployment annotations. This will override the general annotations parameter for the Web deployment.
type: string
tolerations:
description: node tolerations for the pods

View File

@@ -690,6 +690,16 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Task Annotations
path: task_annotations
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Web Annotations
path: web_annotations
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Tolerations
path: tolerations
x-descriptors:

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: