Include kops- prefix in external-dns TXT record

This matches the --txt-owner-id flag we specify in the external-dns pod
This commit is contained in:
Peter Rifel 2021-09-07 20:58:44 -05:00
parent 8dee92b2f3
commit 24e463adba
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
1 changed files with 1 additions and 1 deletions

View File

@ -211,7 +211,7 @@ func precreateDNS(ctx context.Context, cluster *kops.Cluster, cloud fi.Cloud) er
} else {
changeset.Add(rrs.New(dnsHostname, []string{PlaceholderIP}, PlaceholderTTL, rrstype.A))
if cluster.Spec.ExternalDNS.Provider == kops.ExternalDNSProviderExternalDNS {
changeset.Add(rrs.New(dnsHostname, []string{fmt.Sprintf("\"heritage=external-dns,external-dns/owner=%s\"", cluster.GetClusterName())}, PlaceholderTTL, rrstype.TXT))
changeset.Add(rrs.New(dnsHostname, []string{fmt.Sprintf("\"heritage=external-dns,external-dns/owner=kops-%s\"", cluster.GetClusterName())}, PlaceholderTTL, rrstype.TXT))
}
}