mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 22:33:35 +00:00
Add possibility specifying affinity of AWX Pods. (#1139)
* Add an option to specify affinity rules for the awx pod In some cases, you may want to use affinity rules instead of a node selector so you can have more flexbility. For example if you want to have "soft" rules i.e. run my pod on this node if possible otherwise run it anywhere * Rename `node_affinity` to `affinity` * Maintain defaults and CSV * Add fields validation Co-authored-by: Olivier <oliverf1ca@yahoo.com>
This commit is contained in:
committed by
GitHub
parent
9bf896e37c
commit
4c5bae69ef
@@ -81,6 +81,8 @@ node_selector: ''
|
||||
# app.kubernetes.io/name: "<resourcename>"
|
||||
topology_spread_constraints: ''
|
||||
|
||||
affinity: {}
|
||||
|
||||
# Add node tolerations for the AWX pods. Specify as literal block. E.g.:
|
||||
# tolerations: |
|
||||
# - key: "dedicated"
|
||||
|
||||
@@ -379,6 +379,10 @@ spec:
|
||||
topologySpreadConstraints:
|
||||
{{ topology_spread_constraints | indent(width=8) }}
|
||||
{% endif %}
|
||||
{% if affinity | length %}
|
||||
affinity:
|
||||
{{ affinity | to_nice_yaml | indent(width=8) }}
|
||||
{% endif %}
|
||||
{% if tolerations %}
|
||||
tolerations:
|
||||
{{ tolerations | indent(width=8) }}
|
||||
|
||||
Reference in New Issue
Block a user