Repository navigation
Description
Problem
The aether-mesh-dns DaemonSet runs command: ["/agent"] args: ["mesh-dns", …] — i.e. it ships and executes the entire agent binary (controller-runtime, xDS/go-control-plane, CNI server, GAMMA/L4 reconcilers, SPIRE, …) just to serve a small in-process DNS resolver fed by a snapshot file.
Why it matters (talos rev 180 / chart 0.85.0)
- The daemon's job is tiny: read
records.json, answer<svc>.<ns>.aether.internalfrom a map, forward the rest. Resident RSS is already only 12–15Mi, but the mapped binary + any exec-based tooling pays for the full agent's size. - It forces awkward coupling: the readiness probe re-execs this large binary (see mesh-dns: replace exec-marker readiness probe with in-process /healthz (reclaim ~250m fleet CPU) #582), and image/attack surface is far larger than the daemon needs.
Proposal
Add a dedicated minimal binary (e.g. //agent/cmd/mesh-dns or reuse the existing subcommand wired into its own slim go_binary) containing only: the meshdns resolver, snapshot read + fsnotify reload, resolv.conf upstream defaulting, and telemetry. No controller-runtime, no xDS, no k8s client (the daemon already needs no API access — it's fed by the file the agent writes).
- Shrinks the binary and RSS toward the resolver's true footprint (target ~5–8Mi), and makes any exec-based health check cheap (complements/eases mesh-dns: replace exec-marker readiness probe with in-process /healthz (reclaim ~250m fleet CPU) #582).
- Smaller image + attack surface for a component that binds a host port and is reached by every pod's
:53DNAT. - Keep the shared snapshot schema +
serviceref<ns>/<svc>keying + c-ares semantics (EDNS0 echo, NODATA-for-non-A, authoritative never-forward) in the shared Go packages so the daemon and the agent (which WRITES the snapshot) can't drift — just don't drag the whole agent into the daemon image.
Scope
- New slim
go_binarytarget + its own container image (distroless), or a Bazel-sliced build of the mesh-dns entrypoint. charts/aether/templates/mesh-dns-daemonset.yaml: pointcommand/image at the slim binary; themeshDnsDaemonimage ref may need its own digest-pinned entry. Chart version bump.- Gazelle/BUILD wiring; keep
agent mesh-dnssubcommand working (or retire it if fully replaced). Tests unchanged (samemeshdnspackage).
Context
Follows #578 (decouple). Surfaced while assessing a Go→Rust rewrite (rejected — a slim Go binary captures most of the resource win at far lower cost/risk than a second language on this correctness-sensitive path). Pairs with #582 (in-process /healthz probe); together they let meshDnsDaemon.resources drop well below the current 300m/128Mi (inflated only for the re-exec).
Activity
feat(mesh-dns): close the observability gaps (#586) (#587)
build(mesh-dns): give the daemon its own slim image (#583 option B) (#…
docs: correct stale facts found by the 2026-09-15 review (#772) (#773)