Watch
0
0
Fork
You've already forked hyperhive
0

require k8s: swarm services with a pod run in the cluster only

This commit is contained in:
atlas 2026-11-26 00:36:09 +01:00 • committed by maia
commit 44670249b6

View file

@ -7,7 +7,7 @@ to a repo's first run.
## Where it runs
A oneshot `swarm-ci-metrics.service` on a 5-minute timer, on the host that sets
A CronJob in the host's cluster on a 5-minute schedule, on the host that sets
`deploy.ci-metrics.enable`. `allSwarmServices` defaults it on wherever the host
has the poller's store identity, which the host that runs the store has. Run it
on one host per swarm: each poller keeps its own cursor, so two of them push
@ -27,10 +27,9 @@ with `invalid peer certificate: UnknownIssuer`.
### In the cluster
With `deploy.ci-metrics.runtime = "k8s"` (and `deploy.k8s.enable`) the host has
neither the service nor the timer, and the poller is a CronJob in the host's
cluster, on the timer's interval. A switch moves the poller, so one runs at any
time ([the runtime switch](../k8s/runtime.md)). The pod differs from the unit in
The host has neither the service nor the timer, and the poller is a CronJob in
the host's cluster, on the timer's interval ([the runtime module](../k8s/runtime.md)).
The pod differs from the unit in
three places:
- It pushes to the same route of the swarm collector, with the bearer it mints
@ -110,8 +109,8 @@ store then holds the same point twice in the same series, which changes no
panel. Deleting the file re-runs the backfill the same way.
A failed repo leaves its cursor where it was, the pass goes on with the next
repo, and the unit fails, so `systemctl status swarm-ci-metrics` shows it. The
timer runs it again 5 minutes later.
repo, and the Job fails, so `kubectl -n hyperhive get jobs` shows it. The
CronJob runs it again 5 minutes later.
## The board
@ -126,8 +125,8 @@ variable:
## Host setup
The CI run poller, a `swarm-ci-metrics` oneshot on a 5-minute timer on the host
that sets `deploy.ci-metrics.enable`. It runs on the host, not in a container.
The CI run poller, a CronJob on a 5-minute schedule in the cluster of the host
that sets `deploy.ci-metrics.enable`.
`allSwarmServices` defaults it on wherever the host has the poller's store
identity, as for the other swarm services. Set `deploy.ci-metrics.enable = false` to
opt out.