Merge pull request #29378 from vefimova/docker_resolv
Automatic merge from submit-queue Re-writing of the resolv.conf file generated by docker Fixes #17406 Docker 1.12 will contain feature "The option --dns and --net=host should not be mutually exclusive" (docker/docker#22408) This patch adds optional support for this ability in kubelet (for now in case of "hostNetwork: true" set all dns settings are ignored if any). To enable feature use newly added kubelet flag: --allow-dns-for-hostnet=true
This commit is contained in:
@@ -1808,12 +1808,12 @@ func validateRestartPolicy(restartPolicy *api.RestartPolicy, fldPath *field.Path
|
||||
func validateDNSPolicy(dnsPolicy *api.DNSPolicy, fldPath *field.Path) field.ErrorList {
|
||||
allErrors := field.ErrorList{}
|
||||
switch *dnsPolicy {
|
||||
case api.DNSClusterFirst, api.DNSDefault:
|
||||
case api.DNSClusterFirstWithHostNet, api.DNSClusterFirst, api.DNSDefault:
|
||||
break
|
||||
case "":
|
||||
allErrors = append(allErrors, field.Required(fldPath, ""))
|
||||
default:
|
||||
validValues := []string{string(api.DNSClusterFirst), string(api.DNSDefault)}
|
||||
validValues := []string{string(api.DNSClusterFirstWithHostNet), string(api.DNSClusterFirst), string(api.DNSDefault)}
|
||||
allErrors = append(allErrors, field.NotSupported(fldPath, dnsPolicy, validValues))
|
||||
}
|
||||
return allErrors
|
||||
|
Reference in New Issue
Block a user