Skip to content

Commit

Permalink
feat: add custom topologySpreadConstraints support to coredns
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Luiz Pereira Nunes authored and Thiago Luiz Pereira Nunes committed Dec 6, 2024
1 parent d1681a4 commit 1ad08a7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ spec:
{{ ToYAML .KubeDNS.Affinity | indent 8 }}
{{- end }}
topologySpreadConstraints:
{{- if .KubeDNS.TopologySpreadConstraints }}
{{ ToYAML .KubeDNS.TopologySpreadConstraints | indent 6 }}
{{- else }}
- maxSkew: 1
topologyKey: "topology.kubernetes.io/zone"
whenUnsatisfiable: ScheduleAnyway
Expand All @@ -158,6 +161,7 @@ spec:
labelSelector:
matchLabels:
k8s-app: kube-dns
{{- end }}
containers:
- name: coredns
image: {{ if KubeDNS.CoreDNSImage }}{{ KubeDNS.CoreDNSImage }}{{ else }}registry.k8s.io/coredns/coredns:v1.11.3{{ end }}
Expand Down

0 comments on commit 1ad08a7

Please sign in to comment.