mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-07 22:02:53 +00:00
Enable fallback to global settings for db-migration job scheduling (#1804) Modified the db-migration job template to use `task_*` settings with a fallback to global AWX configurations if not specified.
This commit is contained in:
@@ -88,3 +88,8 @@ spec:
|
|||||||
- S2
|
- S2
|
||||||
topologyKey: topology.kubernetes.io/zone
|
topologyKey: topology.kubernetes.io/zone
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Special Note on DB-Migration Job Scheduling
|
||||||
|
|
||||||
|
For the **db-migration job**, which applies database migrations at cluster startup, you can specify scheduling settings using the `task_*` configurations such as `task_node_selector`, `task_tolerations`, etc.
|
||||||
|
If these task-specific settings are not defined, the job will automatically use the global AWX configurations like `node_selector` and `tolerations`.
|
||||||
|
|||||||
@@ -42,6 +42,34 @@ spec:
|
|||||||
{% for secret in image_pull_secrets %}
|
{% for secret in image_pull_secrets %}
|
||||||
- name: {{ secret }}
|
- name: {{ secret }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if task_node_selector %}
|
||||||
|
nodeSelector:
|
||||||
|
{{ task_node_selector | indent(width=8) }}
|
||||||
|
{% elif node_selector %}
|
||||||
|
nodeSelector:
|
||||||
|
{{ node_selector | indent(width=8) }}
|
||||||
|
{% endif %}
|
||||||
|
{% if task_topology_spread_constraints %}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ task_topology_spread_constraints | indent(width=8) }}
|
||||||
|
{% elif topology_spread_constraints %}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ topology_spread_constraints | indent(width=8) }}
|
||||||
|
{% endif %}
|
||||||
|
{% if task_tolerations %}
|
||||||
|
tolerations:
|
||||||
|
{{ task_tolerations | indent(width=8) }}
|
||||||
|
{% elif tolerations %}
|
||||||
|
tolerations:
|
||||||
|
{{ tolerations | indent(width=8) }}
|
||||||
|
{% endif %}
|
||||||
|
{% if task_affinity %}
|
||||||
|
affinity:
|
||||||
|
{{ task_affinity | to_nice_yaml | indent(width=8) }}
|
||||||
|
{% elif affinity %}
|
||||||
|
affinity:
|
||||||
|
{{ affinity | to_nice_yaml | indent(width=8) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
volumes:
|
volumes:
|
||||||
- name: "{{ ansible_operator_meta.name }}-application-credentials"
|
- name: "{{ ansible_operator_meta.name }}-application-credentials"
|
||||||
|
|||||||
Reference in New Issue
Block a user