public-dns (Add): explicit Cloudflare records for every public name (external-dns) #1746

Merged
ginjiruu merged 1 commit from external-dns-cloudflare into main 2026-11-20 01:15:44 +00:00
Owner

Every public name on the site's address gets an explicit Cloudflare record, written by external-dns on mini, so the *.animeteamspeak.moe wildcard can go later. Step 1 of #1708. Nothing is deleted in this PR.

All 43 names are in on purpose. They are public today through the wildcard. Reduce the scope by deleting entries from clusters/mini/public-dns/records/endpoints.yaml, here or in a later PR. external-dns (policy: sync) removes a deleted entry's record on its next run.

New in clusters/mini/public-dns/

  • external-dns 0.23 (chart 1.23.0, as on c1) with the Cloudflare provider:
    • source crd only, so only DNSEndpoints in records/ publish. A new HTTPRoute never goes public by accident.
    • owner mini, TXT markers prefixed edns-cname-<name>: Cloudflare allows no other record beside a CNAME.
    • domain filter animeteamspeak.moe, int.animeteamspeak.moe excluded.
    • managed type CNAME only.
  • records/endpoints.yaml: one DNSEndpoint, 43 entries, each <name> CNAME animeteamspeak.moe. A comment on each entry names the route that serves it. With CNAMEs, cloudflare-ddns only has to keep the apex A record current.
  • The API token is the cloudflare-ddns one, read from the same OpenBao key (cloudflare-ddns-secrets, property CLIENT_TOKEN). On 2026-11-19 it listed the zone and created a record. Swap the key in secret.yaml if you make a dedicated token.
  • Egress allow-list in the pattern of the old external-dns (a6639210): kube-dns, kube-apiserver, api.cloudflare.com:443.
  • crds: CreateReplace: the DNSEndpoint CRD is still on mini, ownerless, from the Technitium external-dns that 52ffc5d8 removed.

Records external-dns leaves alone

It only changes records that carry its own mini TXT marker. Left alone: the apex A (cloudflare-ddns), www, the wildcard, the mail and mx2 records, *.remote, and the int.animeteamspeak.moe TXT added by hand today (it stops the wildcard answering under int).

Names worth a look while trimming

From the inventory, not decided:

  • turn, expense: cert, no route.
  • frigate, carwash-frigate: there are no cameras.
  • httpbin.mini, httpbin-kg.mini: test endpoints.
  • Admin and infrastructure names that are public only because of the wildcard: vault, grafana, harbor, workflows, vm, s3.mini, receiver.mini, mini.k8s, gadmin, admin.media, agentvault, automation.

Port forwards whose client-facing names the clusters don't show: git SSH (git, in the list), TeamSpeak, WireGuard, Valheim, LDAPS, the NATS leaf (nats, in the list). If a client uses a name not in the list, it needs an entry before the wildcard goes.

Checks

  • kustomize build passes for all three directories. helm template with these values renders --source=crd --policy=sync --registry=txt --txt-owner-id=mini --txt-prefix=edns-%{record_type}- --domain-filter=animeteamspeak.moe --exclude-domains=int.animeteamspeak.moe --managed-record-types=CNAME --provider=cloudflare.
  • ClusterSecretStore vault-backend: Ready, no namespace conditions.
  • Not run: the live first sync. After merge, check the external-dns log for 43 CREATE CNAMEs and their TXT markers, then dig git.animeteamspeak.moe @1.1.1.1 (CNAME to the apex).

Next (not here)

Remove the wildcard record and drop WILDCARD_RECORD_ID from cloudflare-ddns in the same change, since the job PATCHes that record by ID every 30 min. Then dig zzq.animeteamspeak.moe @1.1.1.1 should get no answer.

Every public name on the site's address gets an explicit Cloudflare record, written by external-dns on mini, so the `*.animeteamspeak.moe` wildcard can go later. Step 1 of #1708. Nothing is deleted in this PR. **All 43 names are in on purpose.** They are public today through the wildcard. Reduce the scope by deleting entries from `clusters/mini/public-dns/records/endpoints.yaml`, here or in a later PR. external-dns (`policy: sync`) removes a deleted entry's record on its next run. ## New in `clusters/mini/public-dns/` - external-dns 0.23 (chart 1.23.0, as on c1) with the Cloudflare provider: - source `crd` only, so only DNSEndpoints in `records/` publish. A new HTTPRoute never goes public by accident. - owner `mini`, TXT markers prefixed `edns-cname-<name>`: Cloudflare allows no other record beside a CNAME. - domain filter `animeteamspeak.moe`, `int.animeteamspeak.moe` excluded. - managed type `CNAME` only. - `records/endpoints.yaml`: one DNSEndpoint, 43 entries, each `<name> CNAME animeteamspeak.moe`. A comment on each entry names the route that serves it. With CNAMEs, cloudflare-ddns only has to keep the apex A record current. - The API token is the cloudflare-ddns one, read from the same OpenBao key (`cloudflare-ddns-secrets`, property `CLIENT_TOKEN`). On 2026-11-19 it listed the zone and created a record. Swap the key in `secret.yaml` if you make a dedicated token. - Egress allow-list in the pattern of the old external-dns (a6639210): kube-dns, kube-apiserver, `api.cloudflare.com:443`. - `crds: CreateReplace`: the DNSEndpoint CRD is still on mini, ownerless, from the Technitium external-dns that 52ffc5d8 removed. ## Records external-dns leaves alone It only changes records that carry its own `mini` TXT marker. Left alone: the apex A (cloudflare-ddns), `www`, the wildcard, the mail and `mx2` records, `*.remote`, and the `int.animeteamspeak.moe` TXT added by hand today (it stops the wildcard answering under `int`). ## Names worth a look while trimming From the inventory, not decided: - `turn`, `expense`: cert, no route. - `frigate`, `carwash-frigate`: there are no cameras. - `httpbin.mini`, `httpbin-kg.mini`: test endpoints. - Admin and infrastructure names that are public only because of the wildcard: `vault`, `grafana`, `harbor`, `workflows`, `vm`, `s3.mini`, `receiver.mini`, `mini.k8s`, `gadmin`, `admin.media`, `agentvault`, `automation`. Port forwards whose client-facing names the clusters don't show: git SSH (`git`, in the list), TeamSpeak, WireGuard, Valheim, LDAPS, the NATS leaf (`nats`, in the list). If a client uses a name not in the list, it needs an entry before the wildcard goes. ## Checks - `kustomize build` passes for all three directories. `helm template` with these values renders `--source=crd --policy=sync --registry=txt --txt-owner-id=mini --txt-prefix=edns-%{record_type}- --domain-filter=animeteamspeak.moe --exclude-domains=int.animeteamspeak.moe --managed-record-types=CNAME --provider=cloudflare`. - ClusterSecretStore `vault-backend`: Ready, no namespace conditions. - Not run: the live first sync. After merge, check the external-dns log for 43 `CREATE` CNAMEs and their TXT markers, then `dig git.animeteamspeak.moe @1.1.1.1` (CNAME to the apex). ## Next (not here) Remove the wildcard record and drop `WILDCARD_RECORD_ID` from cloudflare-ddns in the same change, since the job PATCHes that record by ID every 30 min. Then `dig zzq.animeteamspeak.moe @1.1.1.1` should get no answer.
external-dns 0.23 on mini, Cloudflare provider, source crd only. 43
DNSEndpoint entries, each a CNAME to the apex, covering every name mini
serves or certifies under animeteamspeak.moe (all public today through
the wildcard). Owner mini, prefixed TXT markers, int excluded, CNAME only.
Token from the cloudflare-ddns OpenBao key. Takes over the ownerless
DNSEndpoint CRD left by the Technitium external-dns. Wildcard removal is
the next step (#1708).
Sign in to join this conversation.
No description provided.