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.
This commit is contained in:
Peter Rifel 2021-02-15 18:00:36 -06:00
parent 6169508aa8
commit 1659a95f56
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
1 changed files with 6 additions and 0 deletions

View File

@ -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
}