Documentation
¶
Overview ¶
Command proxy-ready is the aether-proxy pod's exec readiness probe (#673).
It exists for exactly one reason: to be TINY. The probe used to re-exec /opt/aether/supervisor — which IS the 67MB agent binary, self-copied under another name by the install-supervisor initContainer — once every 2s per pod. Continuous profiling (2026-09-04) showed >=31% of the supervisor container's CPU was process launch: runtime.main 20.27%, runtime.doInit1 19.75% (package init: controller-runtime scheme registration, protobuf descriptor registries), against 0.52% for cobra dispatch and a rounding error for the stat itself.
That cost is package-level init(), which the Go runtime runs BEFORE main() is entered, regardless of argv. An early return at the top of main cannot avoid it. The only way to not pay it is to not link those packages.
Therefore: no cobra, no logging framework, no controller-runtime, no protobuf, no OTel — no third-party imports at all beyond the stdlib-only aethermesh.dev/common/readymarker. Keep it that way; //agent/cmd/proxy-ready:deps_test fails the build if anything else is linked.
An httpGet/tcpSocket probe is NOT an alternative here: the proxy DaemonSet is hostNetwork:true with maxSurge:1, so the predecessor and successor pods share the host network namespace for the whole handoff and no port-based check can be proven pod-local (that is why #582 was closed for the identically shaped mesh-dns DaemonSet, and why OPA's diagnostic API in this same pod moved to a per-pod UDS). Probing Envoy's admin endpoint is not equivalent either: a draining hot-restart parent answers LIVE at its old epoch for the entire --parent-shutdown-time-s window (proposal 001, lesson 6), and the supervisor deliberately HOLDS readiness while it is still the serving parent. The ready-marker is pod-local by construction — it lives in a per-pod emptyDir — and the supervisor's write/clear logic is the only thing that decides it.
--unix-socket is a second, independent mode (#1275): exit 0 iff a connect(2) to that AF_UNIX stream socket succeeds. The chart uses it as the startupProbe of the ext_authz native sidecar (proposal 027), exec'd INSIDE the sidecar's container from the same staged /opt/aether volume, so the kubelet holds the proxy container until the authz gRPC socket in the per-pod authz emptyDir is accepting. The hostNetwork argument above applies unchanged: the socket is pod-local, a port would not be, and the OPA image has no shell or client to probe it with.