Skip to content

Commit 1ad08a7

Browse files
Thiago Luiz Pereira NunesThiago Luiz Pereira Nunes
Thiago Luiz Pereira Nunes
authored and
Thiago Luiz Pereira Nunes
committed
feat: add custom topologySpreadConstraints support to coredns
1 parent d1681a4 commit 1ad08a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

upup/models/cloudup/resources/addons/coredns.addons.k8s.io/k8s-1.12.yaml.template

+4
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ spec:
145145
{{ ToYAML .KubeDNS.Affinity | indent 8 }}
146146
{{- end }}
147147
topologySpreadConstraints:
148+
{{- if .KubeDNS.TopologySpreadConstraints }}
149+
{{ ToYAML .KubeDNS.TopologySpreadConstraints | indent 6 }}
150+
{{- else }}
148151
- maxSkew: 1
149152
topologyKey: "topology.kubernetes.io/zone"
150153
whenUnsatisfiable: ScheduleAnyway
@@ -158,6 +161,7 @@ spec:
158161
labelSelector:
159162
matchLabels:
160163
k8s-app: kube-dns
164+
{{- end }}
161165
containers:
162166
- name: coredns
163167
image: {{ if KubeDNS.CoreDNSImage }}{{ KubeDNS.CoreDNSImage }}{{ else }}registry.k8s.io/coredns/coredns:v1.11.3{{ end }}

0 commit comments

Comments
 (0)