Upgrade external-dns to v0.13.5

This commit is contained in:
John Gardiner Myers 2023-05-10 18:15:58 -07:00
parent de949ca9f7
commit 1e7576c9c5
6 changed files with 13 additions and 9 deletions

View File

@ -52,7 +52,3 @@ CNIs must not masquerade IPv6 addresses.
### Calico
Running IPv6 with Calico requires a Ubuntu 22.04 or Flatcar based AMI.
## Future work
* External-DNS does not, as of the writing of this document, support registering AAAA records.

View File

@ -9,6 +9,8 @@ This is a document to gather the release notes prior to the release.
* The default retention duration for the etcd backups is now set to 90 days.
This behaviour can be overridden by setting `spec.etcdClusters[*].manager.backupRetentionDays` in the cluster spec.
* external-dns is now supported in IPv6 clusters.
## AWS
* As of Kubernetes version 1.27, all nodes will default to running with instance-metadata-service tokens required, with a max hop limit of 1.

View File

@ -1875,9 +1875,6 @@ func validateExternalDNS(cluster *kops.Cluster, spec *kops.ExternalDNSConfig, fl
if cluster.UsesLegacyGossip() || cluster.UsesNoneDNS() {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("provider"), "external-dns requires public or private DNS topology"))
}
if cluster.Spec.IsIPv6Only() {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("provider"), "external-dns does not support IPv6 clusters"))
}
}
return allErrs

View File

@ -1827,6 +1827,11 @@ func ListRoute53Records(cloud fi.Cloud, clusterName string) ([]*resources.Resour
}
prefix := strings.TrimSuffix(name, clusterName)
// Also trim ownership records for AAAA records
if aws.StringValue(rrs.Type) == "TXT" && strings.HasPrefix(prefix, ".aaaa-") {
prefix = "." + strings.TrimPrefix(prefix, ".aaaa-")
}
remove := false
// TODO: Compute the actual set of names?
if prefix == ".api" || prefix == ".api.internal" || prefix == ".bastion" || prefix == ".kops-controller.internal" {

View File

@ -53,7 +53,7 @@ spec:
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
image: registry.k8s.io/external-dns/external-dns:v0.13.1
image: registry.k8s.io/external-dns/external-dns:v0.13.5
args:
{{ range $arg := ExternalDnsArgv }}
- "{{ $arg }}"

View File

@ -222,7 +222,11 @@ func precreateDNS(ctx context.Context, cluster *kops.Cluster, cloud fi.Cloud) er
}
if !foundTXT {
if cluster.Spec.ExternalDNS != nil && cluster.Spec.ExternalDNS.Provider == kops.ExternalDNSProviderExternalDNS {
changeset.Add(rrs.New(recordKey.hostname, []string{fmt.Sprintf("\"heritage=external-dns,external-dns/owner=kops-%s\"", cluster.ObjectMeta.Name)}, PlaceholderTTL, rrstype.TXT))
domain := recordKey.hostname
if ip == PlaceholderIPv6 {
domain = "aaaa-" + domain
}
changeset.Add(rrs.New(domain, []string{fmt.Sprintf("\"heritage=external-dns,external-dns/owner=kops-%s\"", cluster.ObjectMeta.Name)}, PlaceholderTTL, rrstype.TXT))
}
}
created = append(created, recordKey)