Documentation
¶
Overview ¶
Package supervisorcmd builds the cobra command for the Envoy hot-restart supervisor (proposal 001).
It lives here rather than in //agent/internal/cmd so that //agent/cmd/proxy-supervisor can be its own binary (#772 phase B2). The proxy pod stages this binary onto a shared volume and runs it as PID 1, and while it was a subcommand of the agent that meant staging and running the agent's entire 65MiB link set — controller-runtime, client-go, go-control-plane, SPIRE, Gateway API, miekg/dns — to fork a child process. The supervisor's real work is //agent/internal/proxy/hotrestart plus //common/readymarker: ~22 modules, no Kubernetes, no xDS, no SPIRE.
The single line of coupling was manager.SetupLogging, and its only heavy act (ctrl.SetLogger, which drags in //common/manager at 85 modules) is meaningless in a process with no controller-runtime manager. The underlying log.Named(log.NewLogger(debug), name) from //common/log is what is used here, so the emitted log stream is byte-identical.
Keep this package free of heavyweight imports: //agent/cmd/proxy-supervisor:deps_test and scripts/check-proxy-supervisor-deps.sh both fail the build if that changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns the `proxy-supervisor` command. version becomes the OTel service.version on the supervisor's pushed hot-restart metrics; the caller passes the binary's own build ID (//common/buildinfo), which is also what `--version` prints (#1429).
//agent/cmd/proxy-supervisor runs it as its root command. It was also an `agent proxy-supervisor` alias until that was removed after #772.
Types ¶
This section is empty.