Skip to content

Commit 90ebd65

Browse files
committed
docs: update Cloudflare tunnel DNS ownership guidance
1 parent bc01607 commit 90ebd65

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Wave 2: Workloads (CRs that depend on CRDs)
3030
- `openshift-ingress-operator` - IngressController CR
3131
- `cert-manager` - cert-manager controller pods
3232
- `openshift-gitops` - ArgoCD and KSOPS
33+
- `cloudflare-operator-system` - Cloudflare operator, tunnel deployment, DNS API secret
3334

3435
## Certificate Management
3536

@@ -54,6 +55,16 @@ spec:
5455
- `ingress.config.openshift.io/cluster` - componentRoutes for console/oauth certs
5556
- `apiserver.config.openshift.io/cluster` - API server cert
5657

58+
## Cloudflare Tunnel DNS Management
59+
60+
Public `*.makeitwork.cloud` app DNS records are operator-managed from `TunnelBinding` resources.
61+
62+
- Keep `TunnelBinding.tunnelRef.disableDNSUpdates: false` for operator-managed DNS
63+
- `subjects[].name` must match the real Kubernetes `Service` name in the same namespace
64+
- cloudflare-operator stores ownership metadata in `_managed.<fqdn>` TXT records
65+
- Do not delete CNAME records without deleting matching `_managed.<fqdn>` TXT records; stale TXT `DnsId` values cause reconcile failures (`81044`)
66+
- The old `dns-adoption-job` hook is intentionally not used
67+
5768
## SOPS/KSOPS Encryption
5869

5970
Secrets encrypted with age. Each directory with secrets has a KSOPS generator file.
@@ -133,6 +144,10 @@ annotations:
133144

134145
6. **OAuth Replace=true causes sync failures** - The `argocd.argoproj.io/sync-options: Replace=true` annotation causes ArgoCD to delete+create resources. OpenShift protects singleton resources like `oauths.config.openshift.io/cluster` from deletion. Use `ServerSideApply=true` instead for these resources.
135146

147+
7. **Cloudflare stale TXT records break DNS reconciliation** - If `_managed.<fqdn>` TXT records point to deleted CNAME IDs, cloudflare-operator attempts update-by-stale-ID and fails with `Record does not exist. (81044)`. Remove stale `_managed.*` TXT records, then reconcile TunnelBindings.
148+
149+
8. **TunnelBinding subject name is service lookup key** - `subjects[].name` is used to read the Kubernetes Service object. If this name does not exist, operator status falls back to `http_status:404`.
150+
136151
## Useful Commands
137152

138153
```bash

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ Operators must be installed before workloads to ensure CRDs exist.
6666
- CRC with monitoring enabled (`crc config set enable-cluster-monitoring true`)
6767
- `sops-age-keys` secret in `openshift-gitops` namespace (for SOPS decryption)
6868

69+
## Cloudflare DNS Ownership
70+
71+
Public app DNS under `*.makeitwork.cloud` is managed by cloudflare-operator from `TunnelBinding` resources in this repo.
72+
73+
- Keep `TunnelBinding.tunnelRef.disableDNSUpdates: false` for operator-managed DNS
74+
- Set `subjects[].name` to the real Service name in the same namespace
75+
- The operator writes `_managed.<fqdn>` TXT records alongside CNAMEs for ownership tracking
76+
- Do not delete CNAME records without deleting matching `_managed.<fqdn>` TXT records (stale TXT `DnsId` values cause reconcile error `81044`)
77+
- `operators/cloudflare/dns-adoption-job.yaml` is legacy and is intentionally not referenced from `operators/cloudflare/kustomization.yaml`
78+
6979
## CI/CD
7080

7181
On push to `main`, GitHub Actions:

0 commit comments

Comments
 (0)