Merge pull request #12259 from olemarkus/ipv6-nameserver

Set ipv6 nameservers on aws
This commit is contained in:
Kubernetes Prow Robot 2021-09-03 11:12:52 -07:00 committed by GitHub
commit ca26d4343a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ func (b *KubeDnsOptionsBuilder) BuildOptions(o interface{}) error {
clusterSpec.KubeDNS.MemoryLimit = &defaultMemoryLimit
}
if clusterSpec.IsIPv6Only() && kops.CloudProviderID(clusterSpec.CloudProvider) == kops.CloudProviderAWS {
if len(clusterSpec.KubeDNS.UpstreamNameservers) == 0 {
clusterSpec.KubeDNS.UpstreamNameservers = []string{"fd00:ec2::253"}
}
}
nodeLocalDNS := clusterSpec.KubeDNS.NodeLocalDNS
if nodeLocalDNS == nil {
nodeLocalDNS = &kops.NodeLocalDNSConfig{}