Repository navigation
feat(mesh-dns): slim standalone binary for the daemon (#583) - #584
Merged
Merged
Conversation
The aether-mesh-dns DaemonSet ran `command: ["/agent"] args: ["mesh-dns", …]`, shipping and re-execing the ENTIRE agent binary (controller-runtime, xDS/ go-control-plane, CNI, SPIRE) just to serve a snapshot-fed DNS resolver — and its readiness probe re-execed that huge binary every 5s. Add a dedicated slim `//agent/cmd/mesh-dns` binary that imports ONLY the `meshdns` resolver, snapshot fsnotify reload, resolv.conf upstream defaulting, and push-only OTel telemetry. Verified via `bazel query somepath` that it pulls in neither controller-runtime nor go-control-plane. To unblock that graph, `common/file` now logs via stdlib slog instead of `ctrl.Log`, dropping its controller-runtime edge (it's a low-level file util used everywhere). The slim binary ships in the same agent image as an extra `/mesh-dns` layer (no new image/publish pipeline this pass; #583's separate-image option is deferred). The `agent mesh-dns` subcommand is retired — one code path now. Chart: DaemonSet runs `/mesh-dns`; the readiness probe re-execs the slim `/mesh-dns --readiness-check` (cheap) instead of the full agent, so period 15s / timeout 2s and resources drop to req 25m/32Mi lim 100m/64Mi. Resolves #582: its proposed in-process httpGet probe is UNSAFE on a host-network + maxSurge DaemonSet (two pods share the host netns → a health port collides without SO_REUSEPORT or is REUSEPORT-ambiguous = the false-ready #580 rejected). We keep the provably-pod-local ready-marker exec probe and reclaim the ~250m fleet CPU by making the re-exec cheap via the slim binary. Resolver semantics (EDNS0 echo, NODATA-for-non-A, authoritative never-forward, REUSEPORT, marker-after-bind) and the surge/readiness guarantee are unchanged. Closes #583 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slim standalone
/mesh-dnsbinary for the aether-mesh-dns daemon, so it no longer ships + re-execs the full/agentbinary (controller-runtime, xDS, CNI…).What
agent/cmd/mesh-dns/main.go— self-contained resolver entrypoint (snapshot load + fsnotify reload + REUSEPORT serve +--readiness-check), importing onlyagent/internal/meshdnsand light deps.common/file: swapped a leftoverctrl.Log→slog(the sole leak dragging controller-runtime into the slim graph; aligns with the refactor(logging): migrate from logr/zap to stdlib slog for native trace correlation #223 slog migration)./mesh-dnsadded to the agent image (one image, both binaries) — no new image/publish pipeline this pass.command: ["/mesh-dns"], probeperiodSeconds5→15 /timeoutSeconds5→2, resources dropped (req 25m/32Mi, lim 100m/64Mi), Chart 0.85.0→0.86.0.agent mesh-dnssubcommand.Slim dep-graph proof
bazel query 'somepath(//agent/cmd/mesh-dns:mesh-dns, @io_k8s_sigs_controller_runtime//...)'and the go-control-plane equivalent both return empty.Why
Reclaims the ~250m fleet CPU the daemon spent re-execing the full
/agentfor its readiness marker every 5s — via a cheap slim-binary re-exec, keeping the provably-pod-local marker (NOT httpGet, which is unsafe on host-network+surge). Resolver semantics + surge/readiness guarantee unchanged.Closes #583. Resolves #582 (httpGet abandoned as unsafe on host-network+surge; CPU reclaimed here instead).
🤖 Generated with Claude Code