Skip to content

Civo provider: apex records with "@" name not matched correctly #6183

@cjohnhanson

Description

@cjohnhanson

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:

  1. Records() — When reading records back from the API, the condition if r.Name == "" does not match "@", so apex records get incorrectly constructed as @.example.com instead of example.com.

  2. getRecordID() — When matching existing records during plan application, record.Name == stripedName compares "@" against "" for apex endpoints, failing to find the existing record. This causes the provider to attempt creating a record that already exists, resulting in a database_dns_record_already_exist error 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions