kubernetes-sigs/external-dns

External-DNS deletes and recreates constantly a record

sionescu opened this issue · 6 comments

What happened:

An A record that is also the zone root gets deleted and recreated every minute.

Interestingly, for all non-root DNS names 2 TXT records are created, but for this one only 1.
Example: for val0.devnet.aptoslabs.com A, both val0.devnet.aptoslabs.com TXT and a-val0.devnet.aptoslabs.com TXT are created, with identical contents; but for devnet.aptoslabs.com A, only devnet.aptoslabs.com TXT is created.

time="2024-10-04T17:26:31Z" level=debug msg="Matched devnet.aptoslabs.com. (zone: devnet-aptoslabs-com) (visibility: public)"
time="2024-10-04T17:26:31Z" level=debug msg="Considering zone: devnet-aptoslabs-com (domain: devnet.aptoslabs.com.)"
time="2024-10-04T17:26:31Z" level=info msg="Change zone: devnet-aptoslabs-com batch #0"
time="2024-10-04T17:26:31Z" level=info msg="Del records: devnet.aptoslabs.com. A [34.128.141.74] 300"
time="2024-10-04T17:26:31Z" level=info msg="Del records: devnet.aptoslabs.com. TXT [\"heritage=external-dns,external-dns/owner=<...>,external-dns/resource=ingress/<...>\"] 300"
time="2024-10-04T17:26:31Z" level=info msg="Add records: devnet.aptoslabs.com. A [34.128.141.74] 300"
time="2024-10-04T17:26:31Z" level=info msg="Add records: devnet.aptoslabs.com. TXT [\"heritage=external-dns,external-dns/owner=<...>,external-dns/resource=ingress/<...>\"] 300"

What you expected to happen:

The record should be created only once.

How to reproduce it (as minimally and precisely as possible):

  1. configure external-dns to manage one GCP Cloud DNS zone
  2. create a K8s ingress with this annotation external-dns.alpha.kubernetes.io/hostname: <zone root>

Anything else we need to know?:

Command line arguments:

--source=service
--source=ingress
--policy=sync
--txt-owner-id=<per-cluster ID>
--txt-prefix is left unspecified

Environment:

  • External-DNS version (use external-dns --version): 0.15.0
  • DNS provider: Google
  • Others: GKE 1.29.8