feat: add support for coredns_affinity (#11994)

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
This commit is contained in:
Ho Kim
2025-07-28 12:18:27 +09:00
committed by GitHub
parent 95640819f5
commit f347c12145
2 changed files with 12 additions and 15 deletions

View File

@@ -38,21 +38,7 @@ spec:
{{ dns_extra_tolerations | list | to_nice_yaml(indent=2) | indent(8) }}
{% endif %}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
k8s-app: kube-dns{{ coredns_ordinal_suffix }}
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: In
values:
- ""
{{ coredns_affinity | to_nice_yaml(indent=2) | indent(8) }}
containers:
- name: coredns
image: "{{ coredns_image_repo }}:{{ coredns_image_tag }}"