Watch
0
0
Fork
You've already forked hyperhive
0

run the metrics store and its auth responders as pods

This commit is contained in:
atlas 2026-11-27 09:11:27 +01:00 • committed by maia
commit 681426b53b

View file

@ -30,6 +30,8 @@ A service gets manifests on the host whose configuration deploys it:
| `swarm-ci-metrics` | CronJob | ServiceAccount, PersistentVolume and Claim |
| `swarm-victorialogs` | Deployment | Service, NetworkPolicy, PersistentVolume and Claim |
| `swarm-logs-auth` | Deployment | ServiceAccount, two Services, NetworkPolicy |
| `swarm-victoriametrics` | Deployment | Service, NetworkPolicy, PersistentVolume and Claim |
| `swarm-metrics-auth` | Deployment | ServiceAccount, two Services, NetworkPolicy |
`namespace.yaml` holds the Namespace ([Pod Security](#pod-security)), and
`default-deny-ingress/networkpolicy.yaml` its default-deny ingress policy
@ -136,14 +138,15 @@ credential directory.
every pod and admits nobody. The cluster's policy engine takes the union of
the policies that select a pod and always admits the node's own addresses, so
the node reaches a pod, and so does whatever its own policy names. A service with
a listener and `egress` (`swarm-logs-auth`) has the one policy: it admits the
a listener and `egress` (`swarm-logs-auth`, `swarm-metrics-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`. A third-party daemon with no health variable,
`victoria-logs`, names a `probe` path instead (`/health`), which both probes
request on its listener. The health port takes no credential, because the
`victoria-logs` and `victoria-metrics`, names a `probe` path instead (`/health`), which both probes
request on its listener. A `startupFailureThreshold` in it (`victoria-metrics`, 60) adds a
startup probe on the same path, tried every ten seconds, before the other two begin. The health port takes no credential, because the
kubelet's probes carry none and the routes answer a status code with no body.
Only the node reaches it, through the namespace's default-deny
ingress policy and the pod's own policy, which admit no other pod and no
@ -156,7 +159,7 @@ credential directory.
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`. A listener with no `tlsDir`
(`swarm-victorialogs`, `swarm-logs-auth`) serves plain HTTP: it gets the
(`swarm-victorialogs`, `swarm-logs-auth`, `swarm-victoriametrics`, `swarm-metrics-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
@ -166,10 +169,11 @@ 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)). The responders' pod of the log store holds a second container the same way
([runtime](runtime.md#the-log-store)).
([runtime](runtime.md#the-queue)). The responders' pods of the log and metrics
stores hold a second container the same way
([runtime](runtime.md#the-log-store), [runtime](runtime.md#the-metrics-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
host (`swarm-victorialogs`, `swarm-logs-auth`, `swarm-victoriametrics`, `swarm-metrics-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.