Skip to content

Commit

Permalink
If we use node local dns, always use the nld local ip as cluster dns
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Markus With committed Oct 16, 2020
1 parent a7c7af4 commit 29a1cb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/model/components/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ func (b *KubeletOptionsBuilder) BuildOptions(o interface{}) error {
}

if clusterSpec.Kubelet.ClusterDNS == "" {
if clusterSpec.KubeDNS != nil && clusterSpec.KubeDNS.NodeLocalDNS != nil && fi.BoolValue(clusterSpec.KubeDNS.NodeLocalDNS.Enabled) &&
((clusterSpec.KubeProxy != nil && clusterSpec.KubeProxy.ProxyMode == "ipvs") || (clusterSpec.Networking != nil && clusterSpec.Networking.Cilium != nil)) {
if clusterSpec.KubeDNS != nil && clusterSpec.KubeDNS.NodeLocalDNS != nil && fi.BoolValue(clusterSpec.KubeDNS.NodeLocalDNS.Enabled) {
clusterSpec.Kubelet.ClusterDNS = clusterSpec.KubeDNS.NodeLocalDNS.LocalIP
} else {
ip, err := WellKnownServiceIP(clusterSpec, 10)
Expand Down

0 comments on commit 29a1cb2

Please sign in to comment.