-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
First of all, thank you for this awesome project! It has been incredibly useful, and it's awesome to see the constant improvements it is getting.
Ideally I would like to reopen #5278
The documentation and the code for which record types are supported are quite inconsistent.
From the help menu:
--managed-record-types=A... ...
Record types to manage; specify multiple times to include many; (default: A,AAAA,CNAME)
(supported records: A, AAAA, CNAME, NS, SRV, TXT) ($EXTERNAL_DNS_MANAGED_RECORD_TYPES)
From the docs:
- https://kubernetes-sigs.github.io/external-dns/latest/docs/sources/mx-record/
- https://kubernetes-sigs.github.io/external-dns/latest/docs/sources/txt-record/
- https://kubernetes-sigs.github.io/external-dns/latest/docs/sources/ns-record/
In the code (master, no SRV or NAPTR in v0.20.0. Also why wasn't TXT added?):
external-dns/registry/mapper/mapper.go
Lines 30 to 38 in d38daef
| supportedRecords = []string{ | |
| endpoint.RecordTypeA, | |
| endpoint.RecordTypeAAAA, | |
| endpoint.RecordTypeCNAME, | |
| endpoint.RecordTypeNS, | |
| endpoint.RecordTypeMX, | |
| endpoint.RecordTypeSRV, | |
| endpoint.RecordTypeNAPTR, | |
| } |
The actual issue with that codes snippet is that you can create whatever types are enabled by --managed-record-types, but changing or deleting them is restricted through getSupportedTypes().
This can result in users assuming everything is working as expected, leaving it running, only to discover at a later date that e.g. their ACME certificates have suddenly expired, because external-dns sees existing TXT records but doesn't acknowledge ownership of them and therefore doesn't delete them.