mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #8568 from GoogleCloudPlatform/revert-8089-dns
Revert "Introduce an 'svc' segment for DNS search"
This commit is contained in:
commit
2c54540896
@ -997,12 +997,8 @@ func (kl *Kubelet) getClusterDNS(pod *api.Pod) ([]string, []string, error) {
|
|||||||
dns = append([]string{kl.clusterDNS.String()}, hostDNS...)
|
dns = append([]string{kl.clusterDNS.String()}, hostDNS...)
|
||||||
}
|
}
|
||||||
if kl.clusterDomain != "" {
|
if kl.clusterDomain != "" {
|
||||||
// TODO(vishh): Remove the oldNsDomain entry once the DNS crossover to inject
|
nsDomain := fmt.Sprintf("%s.%s", pod.Namespace, kl.clusterDomain)
|
||||||
// "svc" is done.
|
dnsSearch = append([]string{nsDomain, kl.clusterDomain}, hostSearch...)
|
||||||
oldNsDomain := fmt.Sprintf("%s.%s", pod.Namespace, kl.clusterDomain)
|
|
||||||
nsSvcDomain := fmt.Sprintf("%s.svc.%s", pod.Namespace, kl.clusterDomain)
|
|
||||||
svcDomain := fmt.Sprintf("svc.%s", kl.clusterDomain)
|
|
||||||
dnsSearch = append([]string{oldNsDomain, nsSvcDomain, svcDomain, kl.clusterDomain}, hostSearch...)
|
|
||||||
}
|
}
|
||||||
return dns, dnsSearch, nil
|
return dns, dnsSearch, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user