Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1905 from brandong954/v0.16.x
Browse files Browse the repository at this point in the history
[v0.16.x] disables old kubedns when coredns-local enabled.
  • Loading branch information
dominicgunn authored Sep 16, 2020
2 parents ce5faab + 91b569f commit 2ec346a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions builtin/files/userdata/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,7 @@ write_files:
{{- end }}

# CLUSTER DNS
{{ if not .KubeDns.DNSMasq.CoreDNSLocal.Enabled -}}
{{ if eq .KubeDns.Provider "coredns" -}}
remove_object ConfigMap kube-system/kubedns-cm
remove_object Deployment kube-system/kube-dns
Expand All @@ -1160,6 +1161,13 @@ write_files:
"${mfdir}/kube-dns-autoscaler-de.yaml" \
"${mfdir}/kube-dns-de.yaml"
{{- end }}
{{- else }}
remove_object ConfigMap kube-system/kubedns-cm
remove_object Deployment kube-system/kube-dns
remove_object ConfigMap kube-system/coredns-cm
remove_object Deployment kube-system/coredns
remove_object Deployment kube-system/kube-dns-autoscaler
{{- end }}
{{- if .KubeDns.NodeLocalResolver }}
{{- if .KubeDns.DNSMasq.CoreDNSLocal.Enabled }}
deploy "${mfdir}/dnsmasq-node-coredns-local.yaml"
Expand All @@ -1168,7 +1176,11 @@ write_files:
{{- end }}
deploy "${mfdir}/dnsmasq-node-ds.yaml"
{{- end }}
{{ if not .KubeDns.DNSMasq.CoreDNSLocal.Enabled -}}
forceapply "${mfdir}/kube-dns-pdb.yaml"
{{- else }}
remove "${mfdir}/kube-dns-pdb.yaml"
{{- end }}

{{ if .Addons.MetricsServer.Enabled -}}
# METRICS SERVER
Expand Down Expand Up @@ -5632,10 +5644,7 @@ write_files:
- --no-resolv
- --keep-in-foreground
- --neg-ttl={{ .KubeDns.DNSMasq.NegTTL }}
# Send requests to the last server (coredns-local) first and only
# fallback to the previous one (global coredns) if it's unreachable.
- --strict-order
- --server={{.DNSServiceIP}}#53
- --server=127.0.0.1#9254
{{ else }}
- --server=//{{.DNSServiceIP}}
Expand Down

0 comments on commit 2ec346a

Please sign in to comment.