Watch
0
0
Fork
You've already forked hyperhive
0

run the log store and its auth responders as pods

swarm-logs-auth and swarm-metrics-auth take --listen for a TCP address beside
--socket. The log store is a Deployment on a static local volume that is its
old container's data directory, behind a ClusterIP Service the gateway dials by
name. Its two auth_request responders are one unpinned pod with a jwt role.
The renderer gains a plain HTTP listener, a probe path, fsGroupChangePolicy,
and one policy for a pod with both a listener and egress.
This commit is contained in:
atlas 2026-11-26 10:17:57 +01:00 • committed by maia
commit dca4720b7b

View file

@ -28,6 +28,8 @@ A service gets manifests on the host whose configuration deploys it:
| `swarm-review-classifier` | Deployment | ServiceAccount |
| `swarm-claude-login` | Deployment | ServiceAccount |
| `swarm-ci-metrics` | CronJob | ServiceAccount, PersistentVolume and Claim |
| `swarm-victorialogs` | Deployment | Service, NetworkPolicy, PersistentVolume and Claim |
| `swarm-logs-auth` | Deployment | ServiceAccount, two Services, NetworkPolicy |
`namespace.yaml` holds the Namespace ([Pod Security](#pod-security)).
@ -128,17 +130,23 @@ credential directory.
(`collector`). The policy allows its pod on the queue's port too. The node trusts
the pod network's interfaces, so without the policy a pod reaches every port of
the host. A service without `egress` has no
policy.
policy. A service with a listener and `egress` (`swarm-logs-auth`) has the one
policy: it admits the node to the listener and nothing else, and allows the
egress above.
- **Probes:** a service with an opt-in health listener gets its variable set to
`0.0.0.0:8080`, with liveness on `/healthz` and readiness on `/readyz`
(see [Readiness checks](../swarm/readiness.md)). `swarm-controller` is one of
them, with `SWARM_CONTROLLER_HEALTH_ADDR`.
them, with `SWARM_CONTROLLER_HEALTH_ADDR`. A third-party daemon with no health variable,
`victoria-logs`, names a `probe` path instead (`/health`), which both probes
request on its listener.
- **Listener and init container:** a service with a TCP `listener`
(`swarm-controller`, with `swarm.controller.tcp.enable`) publishes its port
with a ClusterIP Service, admits only the node to it with a NetworkPolicy, and
gets an init container and a renewal container that issue its leaf into an
`emptyDir` ([runtime](runtime.md#the-controller)). The image of those
containers is part of `system.build.k8sImages`.
containers is part of `system.build.k8sImages`. A listener with no `tlsDir`
(`swarm-victorialogs`, `swarm-logs-auth`) serves plain HTTP: it gets the
Service and the policy and no leaf, init container or renewal container.
- **More than the daemon:** a service whose pod holds more than its daemon
(the queue, whose server and exporter run beside the responder) names a
function in its entry that adds containers, init containers, volumes, host
@ -147,7 +155,13 @@ credential directory.
daemon's binary, and the credential directory its unit loads from follows
the daemon's name. The pod runs under one ServiceAccount, so a queue that
holds two store roles has both bound to it
([runtime](runtime.md#the-queue)).
([runtime](runtime.md#the-queue)). The responders' pod of the log store holds a second container the same way
([runtime](runtime.md#the-log-store)).
- **A unit of the module's own making:** a service that never ran under systemd on the
host (`swarm-victorialogs`, `swarm-logs-auth`) gives the renderer the
`serviceConfig`, `environment` and `path` of one as a plain attribute set, with
the daemon's flags as a list in `ExecStart`. The renderer reads nothing else of
a unit. `fsGroupChangePolicy` in the entry sets the pod's field of that name.
- **Config checksum:** a Deployment whose service has a ConfigMap (`etcFiles`)
carries `checksum/etc` on its pod template, the hash of that ConfigMap's
content, so a changed file rolls the pod.