kubernetes-sigs / external-dns

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
Apache License 2.0
7.75k stars 2.58k forks source link

CNAME cannot be "Created" / "Updated" in Azure-DNS #4855

Open chris8205 opened 3 weeks ago

chris8205 commented 3 weeks ago

The CNAME cannot be created in Azure-DNS when providing the --default-targets="myfunnydummydomain.com"

External DNS creates the following entries...

Name Type TTL Value
cname-grafana TXT 300 "heritage=external-dns,external-dns/owner=*****,external-dns/resource=ingress/system/observability-grafana"
grafana CNAME 300 "myfunnydummydomain.com"

Error Message:

{"level":"error","msg":"Failed to update TXT record named 'grafana' to '\"heritage=external-dns,external-dns/owner=*************,external-dns/resource=ingress/system/observability-grafana\"' for DNS zone 'myDNSZone.TLD': PUT https://management.azure.com/subscriptions/efa*****-****-****-****-************/resourceGroups/d-lock-rg/providers/Microsoft.Network/dnsZones/myDNSZone.TLD/TXT/grafana\n--------------------------------------------------------------------------------\nRESPONSE 409: 409 Conflict\nERROR CODE: Conflict\n--------------------------------------------------------------------------------\n{\n \"code\": \"Conflict\",\n \"message\": \"The record could not be created because a CNAME record with the same name already exists in this zone.\",\n \"details\": [\n {\n \"code\": \"CannotCreateRecordDueToCNameNamingRestriction\",\n \"message\": \"The record could not be created because a CNAME record with the same name already exists in this zone.\"\n }\n ]\n}\n--------------------------------------------------------------------------------\n","time":"2024-11-07T10:39:12Z"}

so external dns would try to create this WRONG entries...

Name Type TTL Value
cname-grafana TXT 300 "heritage=external-dns,external-dns/owner=*****,external-dns/resource=ingress/system/observability-grafana"
grafana CNAME 300 "myfunnydummydomain.com"
$${\color{red}grafana}$$ $${\color{red}TXT}$$ $${\color{red}300}$$ $${\color{red}"heritage=external-dns,external-dns/owner=*****,external-dns/resource=ingress/system/observability-grafana"}$$