mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 22:33:35 +00:00
add topology constraint for each deployment (#1234)
This commit is contained in:
@@ -169,6 +169,12 @@ spec:
|
|||||||
topology_spread_constraints:
|
topology_spread_constraints:
|
||||||
description: topology rule(s) for the pods
|
description: topology rule(s) for the pods
|
||||||
type: string
|
type: string
|
||||||
|
task_topology_spread_constraints:
|
||||||
|
description: topology rule(s) for the task pods
|
||||||
|
type: string
|
||||||
|
web_topology_spread_constraints:
|
||||||
|
description: topology rule(s) for the web pods
|
||||||
|
type: string
|
||||||
annotations:
|
annotations:
|
||||||
description: annotations for the pods
|
description: annotations for the pods
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -99,6 +99,28 @@ task_node_selector: ''
|
|||||||
# app.kubernetes.io/name: "<resourcename>"
|
# app.kubernetes.io/name: "<resourcename>"
|
||||||
topology_spread_constraints: ''
|
topology_spread_constraints: ''
|
||||||
|
|
||||||
|
# Add a topologySpreadConstraints for the task pods.
|
||||||
|
# Specify as literal block. E.g.:
|
||||||
|
# task_topology_spread_constraints: |
|
||||||
|
# - maxSkew: 100
|
||||||
|
# topologyKey: "topology.kubernetes.io/zone"
|
||||||
|
# whenUnsatisfiable: "ScheduleAnyway"
|
||||||
|
# labelSelector:
|
||||||
|
# matchLabels:
|
||||||
|
# app.kubernetes.io/name: "<resourcename>""
|
||||||
|
task_topology_spread_constraints: ''
|
||||||
|
|
||||||
|
# Add a topologySpreadConstraints for the web pods.
|
||||||
|
# Specify as literal block. E.g.:
|
||||||
|
# web_topology_spread_constraints: |
|
||||||
|
# - maxSkew: 100
|
||||||
|
# topologyKey: "topology.kubernetes.io/zone"
|
||||||
|
# whenUnsatisfiable: "ScheduleAnyway"
|
||||||
|
# labelSelector:
|
||||||
|
# matchLabels:
|
||||||
|
# app.kubernetes.io/name: "<resourcename>"
|
||||||
|
web_topology_spread_constraints: ''
|
||||||
|
|
||||||
# Add node tolerations for the AWX pods. Specify as literal block. E.g.:
|
# Add node tolerations for the AWX pods. Specify as literal block. E.g.:
|
||||||
# tolerations: |
|
# tolerations: |
|
||||||
# - key: "dedicated"
|
# - key: "dedicated"
|
||||||
|
|||||||
@@ -372,7 +372,10 @@ spec:
|
|||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ node_selector | indent(width=8) }}
|
{{ node_selector | indent(width=8) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if topology_spread_constraints %}
|
{% if task_topology_spread_constraints %}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ task_topology_spread_constraints | indent(width=8) }}
|
||||||
|
{% elif topology_spread_constraints %}
|
||||||
topologySpreadConstraints:
|
topologySpreadConstraints:
|
||||||
{{ topology_spread_constraints | indent(width=8) }}
|
{{ topology_spread_constraints | indent(width=8) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -234,6 +234,13 @@ spec:
|
|||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ node_selector | indent(width=8) }}
|
{{ node_selector | indent(width=8) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if web_topology_spread_constraints %}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ web_topology_spread_constraints | indent(width=8) }}
|
||||||
|
{% elif topology_spread_constraints %}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{ topology_spread_constraints | indent(width=8) }}
|
||||||
|
{% endif %}
|
||||||
{% if web_tolerations %}
|
{% if web_tolerations %}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{ web_tolerations| indent(width=8) }}
|
{{ web_tolerations| indent(width=8) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user