Insert 'svc' into the DNS search paths
Fixes #8569. This requires the DNS server to be running kube2sky v1.6 or higher (part of release 0.18). Users with older kube2sky MUST NOT update to this kubelet until they upgrade DNS. Versions of kube2sky >= 1.6 support both old and new style names. Old style names are deprectaed and will be removed around the time of kubernetes v1.0 release.
This commit is contained in:
@@ -1014,8 +1014,9 @@ func (kl *Kubelet) getClusterDNS(pod *api.Pod) ([]string, []string, error) {
|
||||
dns = append([]string{kl.clusterDNS.String()}, hostDNS...)
|
||||
}
|
||||
if kl.clusterDomain != "" {
|
||||
nsDomain := fmt.Sprintf("%s.%s", pod.Namespace, kl.clusterDomain)
|
||||
dnsSearch = append([]string{nsDomain, kl.clusterDomain}, hostSearch...)
|
||||
nsSvcDomain := fmt.Sprintf("%s.svc.%s", pod.Namespace, kl.clusterDomain)
|
||||
svcDomain := fmt.Sprintf("svc.%s", kl.clusterDomain)
|
||||
dnsSearch = append([]string{nsSvcDomain, svcDomain, kl.clusterDomain}, hostSearch...)
|
||||
}
|
||||
return dns, dnsSearch, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user