Skip to content

fix(external-dns): unique txt-owner-id per cluster to stop record deletion - #35

Merged
jonathandieu merged 1 commit into
mainfrom
fix/external-dns-owner-id-per-cluster
Aug 13, 2026
Merged

fix(external-dns): unique txt-owner-id per cluster to stop record deletion#35
jonathandieu merged 1 commit into
mainfrom
fix/external-dns-owner-id-per-cluster

Conversation

@jonathandieu

Copy link
Copy Markdown
Owner

Fixes #34.

Problem

external-dns runs on every cluster (the infrastructure appset's clusters: {}
generator) and all instances shared txtOwnerId: dieubernetes against the single
shared dieu.dev Cloudflare zone with --policy=sync. Each instance only sees its
own cluster's HTTPRoutes, so a cluster without a given route treats the records
another cluster created (same owner-id) as "mine but undesired" and deletes them.

Observed: stage created recipes/analytics/changes (A, AAAA, ownership TXT) every
reconcile; platform deleted the same records every reconcile. The records never
survived a cycle, so the hostnames never resolved to the gateway. Both operations
succeed, so nothing was logged as an error.

Fix

Give each cluster a unique owner-id via a per-cluster override, so each instance
manages only its own records:

  • clusters/stage-do-atl1/overrides/external-dns.yaml -> dieubernetes-stage
  • clusters/platform-do-atl1/overrides/external-dns.yaml -> dieubernetes-platform

prod is not a registered ArgoCD cluster yet, so it runs no external-dns; add the
same override (dieubernetes-prod) when it is registered.

Verify after merge

  • platform external-dns stops logging DELETE for recipes/analytics/changes.
  • stage's A/AAAA + a-/aaaa- TXT records for those hosts persist in Cloudflare,
    pointing at the Cilium gateway IP, proxied.
  • dig recipes.dieu.dev resolves; the sites become reachable by hostname.

Notes

…etion

external-dns runs on every cluster (the infra appset's clusters:{} generator)
and all instances shared txtOwnerId=dieubernetes against the single shared
dieu.dev Cloudflare zone with policy=sync. Each instance only sees its own
cluster's HTTPRoutes, so clusters without a given route treated the records
another cluster created (same owner-id) as "mine but undesired" and deleted
them. In practice: stage created recipes/analytics/changes every reconcile,
platform deleted them every reconcile, and the records never persisted, so
the hostnames never resolved to the gateway.

Give each cluster a unique owner-id so each manages only its own records:
- stage    -> dieubernetes-stage
- platform -> dieubernetes-platform

prod is not a registered ArgoCD cluster yet; add the same override when it is.

Fixes #34
@jonathandieu jonathandieu self-assigned this Aug 13, 2026
@jonathandieu
jonathandieu marked this pull request as ready for review August 13, 2026 01:58
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

external-dns: shared owner-id across clusters deletes workload DNS records

1 participant