Skip to content

Let the devantler.tech apex record follow the gateway without a manual step #6312

Closed

Description

@devantler

Why

The plan for #6177 was to hand the devantler.tech and www records to the platform's external-dns. www works. The apex (devantler.tech itself) cannot be owned by external-dns as configured.

external-dns stores ownership in a TXT record named <prefix><type>-<first label>.<rest>. With txtPrefix: "_externaldns.", portal.devantler.tech gets _externaldns.a-portal.devantler.tech, which is fine. For the apex the same rule gives _externaldns.a-devantler.tech, which is a different domain outside our zone. external-dns can never write or read it, so it never owns the apex and skips it. The upstream docs say the same: to manage an apex with the TXT registry, the prefix must contain %{record_type} and end in a dot (docs/registry/txt.md at v0.23.0).

Changing the prefix is not a safe fix either. Upstream: "The prefix or suffix may not be changed after initial deployment, lest the registry records be orphaned". Every record external-dns owns today, the mail records included, would lose its owner.

For the cutover, the apex therefore gets a hand-set record pointing at the gateway: one A and one AAAA record, proxied. That is static. If the gateway's load balancer IP ever changes, someone has to update it by hand.

Options

  1. Keep the hand-set apex record, and add it to the gateway IP's disaster-recovery steps. Simplest. One manual record.
  2. Point the apex at www with a flattened CNAME (devantler.tech CNAME www.devantler.tech, proxied). www is owned by external-dns, so the apex follows the gateway automatically. The switch from A/AAAA to CNAME is a delete plus a create, so do it with Cloudflare's batch API (one transaction) or in the devantler-tech/cloudflare OpenTofu owner once its applies are enabled.
  3. A second external-dns instance only for the apex, with its own owner ID and a _externaldns-%{record_type}. prefix. Most parts. Only worth it if more apex records need automation.

Done when

The apex follows the gateway's address without a manual step, or the hand-set record is written into the recovery runbook.

Found while doing #6177. Part of devantler-tech/monorepo#3939.

🤖 Generated with Claude Code

Activity

  1. added theissue type on Nov 15, 2026
  2. moved this to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Nov 15, 2026
  3. devantler commented on Nov 15, 2026

    @devantler
    ContributorAuthor

    Chosen fix: none of the three options above. The maintainer asked for the declarative route, so external-dns itself will own the apex. #6314 changes the prefix to _externaldns%{record_type}., which puts the apex marker inside the zone (_externaldnsa.devantler.tech) and still reads every old marker. The orphaning risk named above is handled by first copying each of the 46 current markers to its new name in devantler-tech/cloudflare; #6314 merges only after those copies resolve. Runbook: #6177 (comment)

    🤖 Generated with Claude Code

  4. devantler commented on Nov 15, 2026

    @devantler
    ContributorAuthor

    Update: the fix is option 2, done declaratively in devantler-tech/cloudflare (cloudflare#21), and replaces the prefix change in my previous comment (#6314 is closed). The zone snapshot shows the apex is a single flattened CNAME to devantler.github.io, not eight address records, so re-pointing it to www.devantler.tech (proxied) is one in-place edit with no gap. www moves to external-dns under the existing prefix with the marker _externaldns.cname-www.devantler.tech, so the apex follows the gateway through www.

    external-dns v0.23.0 planner check on a zone of that shape: it plans no apex change today, after the www marker, or after the re-point. The apex stays in the HTTPRoute because the gateway routes on it. Done when the apex CNAME points at www and both names serve from the platform.

    🤖 Generated with Claude Code

  5. devantler commented on Nov 15, 2026

    @devantler
    ContributorAuthor

    Done: the apex is a flattened CNAME to www.devantler.tech, proxied (devantler-tech/cloudflare#79), and www is owned by external-dns. The apex now follows the gateway without a manual step. Verified live; see #6177.

    🤖 Generated with Claude Code

  6. moved this from 🏃🏻‍♂️ In Progress to ✅ Done in 🌊 Project Boardon Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions