From 1ad08a71e94a690a971f701b535f5ea9cd51b7d3 Mon Sep 17 00:00:00 2001 From: Thiago Luiz Pereira Nunes Date: Fri, 6 Dec 2024 16:02:57 -0300 Subject: [PATCH] feat: add custom topologySpreadConstraints support to coredns --- .../addons/coredns.addons.k8s.io/k8s-1.12.yaml.template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template b/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template index ac604813b6b92..e96a790baa8d5 100644 --- a/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template +++ b/upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template @@ -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 @@ -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 }}