Skip to content

DNSEndpoint clean-up issues with TXT and PTR records #6182

@mateuszdrab

Description

@mateuszdrab

What happened:

I've implemented DNSEndpoint CRD use in my environment.

A records get created and removed fine along with their ownership records

TXT records fail to cleanup, leaving them and their ownership TXT records behind. Those TXT records then block the recreation of the A records (as they have the same name)
Verbose logs indicate no attempt at removal of those records.

PTR records which are added from DNSEndpoint get created fine in the PTR zone; however, they do not get auto removed when the DNSEndpoint resource no longer contains the record. The PTR record and its ownership TXT record remain. This is only the case of PTR records created manually by specifying recordType: PTR, automatic PTR records created for A records from the DNSEndpoint are removed fine.
Verbose logs indicate no attempt at removal of those records.

For both the TXT and PTR records, logs indicate:

Skipping endpoint 105.3.168.192.in-addr.arpa 300 IN PTR test2.x.local [] because of missing owner label (required: "x-cluster")
Skipping endpoint test.x.local 300 IN TXT  test [] because of missing owner label (required: \"x-cluster\")"

The TXT record _ptr-105.3.168.192.in-addr.arpa exists and contains that exact label
The TXT record _txt-test.x.local also exists

Both contain
heritage=external-dns,external-dns/owner=x-cluster,external-dns/resource=crd/default/<name-of-resource> where name-of-resource is the original DNSEndpoint resource that created the record.

What you expected to happen:
DNSEndpoint records get created and removed according to what is populated in the DNSEndpoint resource.

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

I configured the instance with below args (where I redacted my domain to X:

--log-level=debug
--log-format=text
--interval=1m
--source=service
--source=ingress
--source=crd
--policy=sync
--registry=txt
--txt-owner-id=x-cluster
--txt-prefix=_
--domain-filter=x.local
--domain-filter=3.168.192.in-addr.arpa
--exclude-domains=unrelated.x.local
--managed-record-types=A
--managed-record-types=CNAME
--managed-record-types=TXT
--managed-record-types=PTR
--provider=rfc2136
--rfc2136-host=$(RFC2136_HOST)
--rfc2136-port=53
--rfc2136-zone=x.local
--rfc2136-gss-tsig
--rfc2136-tsig-axfr
--rfc2136-kerberos-username=$(RFC2136_KERBEROS_USERNAME)
--rfc2136-kerberos-password=$(RFC2136_KERBEROS_PASSWORD)
--rfc2136-kerberos-realm=X.LOCAL
--rfc2136-create-ptr
--rfc2136-zone=3.168.192.in-addr.arpa

Also attempted to test creation of TXT records against an unauthenticated DNS zone using rfc2136 and the TXT records also failed to be deleted.

Anything else we need to know?:

Environment:

  • External-DNS version (use external-dns --version): 0.20
  • DNS provider: rfc2136
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions