Watch
0
0
Fork
You've already forked hyperhive
0

bind health listeners to the pod's loopback and probe them by exec

This commit is contained in:
atlas 2026-11-27 23:45:00 +01:00
commit 62cc95671d

View file

@ -10,9 +10,12 @@ One image runs one daemon. Its contents are:
- the daemon's per-bin package from `nix/packages/default.nix`,
- the CA roots from `pkgs.cacert`, with `SSL_CERT_FILE` pointing at them,
- the binary's own closure, which is glibc and libgcc.
- the binary's own closure, which is glibc and libgcc,
- for a daemon with a health listener, `wgetOnly` (`wget` and nothing else of
busybox): the listener binds to the pod's loopback, and the pod's `exec`
probes run it against `http://127.0.0.1:<port>`.
The image has no shell and no init. The kubelet restarts a crashed container, so a
The image has no shell and no init (`wget` is the one tool it may add). The kubelet restarts a crashed container, so a
service manager inside it would only disagree with the kubelet. A missing
shell also leaves nothing to `exec` into. The entrypoint is `/bin/<bin>`, and
the process runs as the `serviceUser` uid and gid that `nix/images/default.nix`
@ -36,12 +39,13 @@ Each of these is a flake package named `image-<daemon>`, and the image name is
- `swarm-ci-metrics`
`nix flake check` evaluates all six and builds none of them, so the workspace
compile stays out of CI. `swarm-claude-login`, `swarm-review-classifier` and
compile stays out of CI. All but `swarm-ci-metrics`, which has no health
listener, hold `wgetOnly`. `swarm-claude-login`, `swarm-review-classifier` and
`swarm-stt` aren't in the set: [the manifest renderer](manifests.md#pods) builds
their images, with the paths their units' environments name (claude-code and
opencode, ffmpeg, whisper-cli and the model). It builds three more for the
queue's pod ([runtime](runtime.md#the-queue)): the NATS server, which also
holds `wget`, the one tool of busybox its readiness probe needs; the
queue's pod ([runtime](runtime.md#the-queue)): the NATS server, which holds
`wgetOnly` for its readiness probe, as the daemons' images do; the
Prometheus exporter; and an image of the queue's init and renewal scripts.
## Tags