Public: anyone can read this; nobody can change it.

azure-gate aks: delegate per-run DNS via az, never Cloudflare from the runner #167

Merged opened this view on origin

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

The aks gate failed in CI at the DNS step: the Cloudflare token is IP-restricted — it works from a laptop (200) but 403s from the vxrail runner (egress 76.141.41.14). Verified by running the same token+curl from both. The secret is correct; Cloudflare rejects the runner's IP.

Notes

shipped merged

opened this view on origin

The aks gate failed in CI at the DNS step: the Cloudflare token is IP-restricted — it works from a laptop (200) but 403s from the vxrail runner (egress 76.141.41.14). Verified by running the same token+curl from both. The secret is correct; Cloudflare rejects the runner's IP. Rather than change the token, move delegation off the runner entirely.

Design: a STANDING Azure DNS zone gate.open-platform.sh (in mitosis-gate-dns), delegated in Cloudflare once via the new deploy/azure/setup-dns.sh (run from an allowed IP — done). Each aks run's per-run zone <slug>.gate.open-platform.sh is delegated by writing its NS as a record-set in that parent zone with az — which works from the runner. The gate never calls Cloudflare. Two-level az delegation was proven to resolve publicly (1.1.1.1) before shipping, and torn down clean.

  • gate.sh: az_delegate/az_undelegate replace the cf_* helpers; the aks preflight verifies the standing zone exists (fail-fast) instead of probing the CF token; teardown + janitor undelegate via az.
  • azure-gate.yml: drop the now-unused CF_API_TOKEN.
  • Per-run zone (createDnsZone=true), the cert-manager identity's DNS-01 rights, and Ben's identity-rewrite shield are all unchanged — only how the per-run zone gets delegated changed.

Only touches the aks gate files (not coldstart's paths), so vms is unaffected. After this, an aks run should reach germination; I'll drive A12/CNPG from there.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs