-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Bug
The Civo DNS API returns "@" as the record name for apex (root) domain records. The Civo provider in external-dns expects apex records to have an empty string "" as the name, causing a mismatch in two locations:
-
Records()— When reading records back from the API, the conditionif r.Name == ""does not match"@", so apex records get incorrectly constructed as@.example.cominstead ofexample.com. -
getRecordID()— When matching existing records during plan application,record.Name == stripedNamecompares"@"against""for apex endpoints, failing to find the existing record. This causes the provider to attempt creating a record that already exists, resulting in adatabase_dns_record_already_existerror from the Civo API on every sync loop.
Symptoms
Every reconciliation loop logs errors like:
level=error msg="Failed to Create record: database_dns_record_already_exist"
for apex A/AAAA records, because the provider cannot find the existing record and tries to re-create it.
Root cause
The Civo API inconsistently represents apex records — sometimes as "", sometimes as "@". The provider only handles the "" case.
Proposed fix
Normalize "@" to "" in both Records() and getRecordID() in provider/civo/civo.go. A PR with this fix and tests will follow.
Environment
- external-dns version: v0.15+ (current master)
- DNS provider: Civo
- Kubernetes: K3s on Civo cloud