Skip to content

fix(helm,cli): CE-21 second slice — platform Aegra without DNS, atomic admission lock - #149

Merged
devopssquaddev merged 3 commits into
mainfrom
fix/aegra-dns-lockdown
Nov 18, 2026
Merged

devopssquaddev merged 3 commits into
mainfrom
fix/aegra-dns-lockdown

Conversation

@devopssquaddev

Copy link
Copy Markdown
Owner

CE-21 second slice, so 2.6.0 ships the whole DNS lockdown (the first slice, #148, covered charts/zelkor-agent pods).

Recon (tes2)

  • Platform Aegra leaked: kube-dns answered it, an outside SOA came back and github.com resolved.
  • Sandbox workers were already DNS-free: their egress is deny-all whenever sandboxMCP is on, and they call no names.
  • runtime: app isn't built yet, so it's out of this slice.

Changes

  • Platform Aegra is locked.
    • On Kubernetes ≥ 1.36, the admission policy locks it.
    • On older clusters, the chart reads the live host map with Helm lookup at upgrade, but only when the map already holds every platform name Aegra calls. A first install, or a map from an older revision, keeps DNS (annotated inactive) until the next upgrade.
    • qdrant joins the host map.
    • Opt out with security.dnsLockdown.aegra=false.
  • Atomic admission path (fixes a race in fix(helm,cli,agents): agent pods run without DNS (CE-21) #148).
    • The race: an upgrade that changed the policy selector created the platform Aegra pod before the API server reloaded the policy. The template had already set dnsPolicy: None, so the pod hung with no host entries and no port 53. A fresh install could hit the same race.
    • The fix: charts now mark pods zelkor.io/dns-lockdown: requested and keep normal DNS. The policy sets dnsPolicy, dnsConfig, hostAliases and the label on in one mutation.
    • Port 53 is cut only for pods labelled on. The agent chart's own DNS rule moves to {release}-egress-dns, keyed on that label.
    • A pod the policy misses keeps working DNS, and zelkor verify --hosts WARNs to delete it.
  • zelkor verify --hosts also checks this platform's Aegra pods and reports requested pods.
  • S-90 adds the sandbox workers as a target.

Proof

  • tes2 (kind, Kubernetes 1.36.4):
    • The selector-change upgrade raced again, and this time the platform Aegra stayed requested, Ready with DNS. verify WARNed; after a pod delete it was locked.
    • The agents re-rendered and locked atomically.
    • S-90 PASS, covering locked pods (platform Aegra included) and sandbox workers.
    • Regression: platform 1291 passed / 90 skipped; FinServe 34 / 2.
  • demohetzner (k3s 1.35, lookup path):
    • Upgrade 1 left Aegra inactive because the old map lacked qdrant; its Job added it.
    • Upgrade 2 locked Aegra.
    • S-90 PASS in both cases.
    • verify caught rt-pydantic one name short until zelkor deploy, then reported OK.
    • A finserve-alpha run through the public front door exited 0.

Offline: 453 Helm and CLI tests pass.

🤖 Generated with Claude Code

devopssquaddev and others added 3 commits November 18, 2026 19:25
…slice)

Recon on tes2 showed the platform Aegra still resolved outside names
through kube-dns. It now carries zelkor.io/dns-lockdown=on and
zelkor.io/platform-release with dnsPolicy None and a dead nameserver:
on K8s >= 1.36 the admission policy injects its hostAliases; on older
clusters the chart reads the live host map with Helm lookup at upgrade
(a first install keeps DNS, annotated inactive, until the next upgrade).
Opt-out: security.dnsLockdown.aegra=false.

The admission policy now selects by the dns-lockdown=on label (plus the
platform release) instead of the workload type, so agents and the
platform Aegra share one policy. qdrant joins the host map. zelkor
verify --hosts also checks this platform's Aegra pods. S-90 adds the
sandbox workers as a target: their egress is deny-all, DNS included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On tes2 an upgrade that changed the policy selector created the platform
Aegra pod before the API server reloaded the policy. The template had
already set dnsPolicy None and dns-lockdown=on, so the pod came up with
no hostAliases and no port 53 and hung in its init containers.

On clusters with the admission API, charts now render pods with
zelkor.io/dns-lockdown=requested and normal DNS. The policy selects
requested and, in one mutation, sets dnsPolicy, dnsConfig, hostAliases
and the label "on". Port 53 is cut only for pods labelled on: the agent
chart's DNS rule moves to its own {release}-egress-dns policy keyed on
that label, like the platform ones. A pod the policy misses keeps
working DNS and zelkor verify --hosts warns to delete it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is complete

A map written by an older revision can lack a Service this revision adds
(qdrant in 2.6.0). Locking Aegra on it would cut that name until the next
upgrade, so on clusters without the admission API Aegra stays inactive
until the map holds every platform name it calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devopssquaddev
devopssquaddev merged commit 4eb45d5 into main Nov 18, 2026
13 checks passed
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.

1 participant