From 1659a95f5625c3ca0ff1c3431e578b9aa6bb1094 Mon Sep 17 00:00:00 2001 From: Peter Rifel Date: Mon, 15 Feb 2021 18:00:36 -0600 Subject: [PATCH] Precreate the kops-controller DNS name We're seeing test failures in prow because nodes are not able to resolve the kops-controller dns record. Judging by timestamps, dns-controller adds the record after it is first queried by nodeup. The negative TTL is long enough that the cluster doesn't validate within the alotted time. Rather than increasing the validation timeout I think its better to precreate the DNS record the same way we do for the other records. --- upup/pkg/fi/cloudup/dns.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upup/pkg/fi/cloudup/dns.go b/upup/pkg/fi/cloudup/dns.go index 1170c2dceb..ff520a3b44 100644 --- a/upup/pkg/fi/cloudup/dns.go +++ b/upup/pkg/fi/cloudup/dns.go @@ -28,6 +28,7 @@ import ( "k8s.io/kops/dnsprovider/pkg/dnsprovider" "k8s.io/kops/dnsprovider/pkg/dnsprovider/rrstype" "k8s.io/kops/pkg/apis/kops" + apimodel "k8s.io/kops/pkg/apis/kops/model" kopsdns "k8s.io/kops/pkg/dns" "k8s.io/kops/pkg/featureflag" "k8s.io/kops/pkg/model" @@ -260,5 +261,10 @@ func buildPrecreateDNSHostnames(cluster *kops.Cluster) []string { } } + if apimodel.UseKopsControllerForNodeBootstrap(cluster) { + name := "kops-controller.internal." + cluster.ObjectMeta.Name + dnsHostnames = append(dnsHostnames, name) + } + return dnsHostnames }