Watch
0
0
Fork
You've already forked hyperhive
0

run grafana as a pod in the cluster

The Deployment swarm-grafana replaces the swarm-grafana container: one
replica on a static local volume that is the container's data directory,
an init container that fetches the OIDC client secret and creates the
administrator password, the datasources' bearer and the encryption key in
the secret store, and a sidecar that keeps the controller's Viewer token.
The datasources reach the stores through the gateway with that bearer, and
Grafana's /metrics asks for the stores' kind of credential, which the vhost
sends. The five host units, the journal forwarder, its client glue and the
unix-socket directory go with the container.
This commit is contained in:
atlas 2026-11-27 22:51:25 +01:00
commit 9f62e71dae
2 changed files with 1938 additions and 1953 deletions

View file

@ -135,7 +135,11 @@ container, its sockets, secrets and metrics:
The swarm's telemetry lands in one VictoriaMetrics, and one Grafana reads it,
at `metrics.<swarm-domain>` and `grafana.<swarm-domain>`. They run apart so you
can restart or break Grafana without losing the time-series database.
can restart or break Grafana without losing the time-series database. Both
run as pods in the host's cluster, and Grafana keeps its database on the host's
disk. Grafana reads its secrets when its pod starts: after you replace its OIDC
client secret, restart it with
`kubectl -n hyperhive rollout restart deployment/swarm-grafana`.
`deploy.victoriametrics.enable` turns [the cluster node](../../4-implementation/k8s/node.md)
on with it. Enabling either enables both; to run one alone, set it directly with
`deploy.victoriametrics.enable` or `deploy.grafana.enable`.

View file

@ -164,14 +164,16 @@ gateway refuses its token too. See [`swarmctl/README.md`](../../../swarmctl/READ
one minted into the swarm secret store, not the upstream `admin`. A
dead provider locks out the SSO accounts but not that one: an operator
reads the password from `swarm/services/<grafana client id>/admin/password`
in the store (or, as root on the Grafana host, from
`/run/swarm-grafana-secrets/admin-password`)
and calls the API with it. See [`services.md`](services.md#metrics-victoriametrics--grafana)
in the store and calls the API with it. See [`services.md`](services.md#metrics-victoriametrics--grafana)
and [`credentials.md`](credentials.md). SSO logins are the everyday way in, which
is why `swarm.grafana.oidc.role` defaults to `Admin`.
The three secrets Grafana reads live on the host's tmpfs, so after a reboot
Grafana stays down (no login, no dashboards) until the secret store
answers; the delivery units retry and start it with no manual step.
Grafana runs as a pod in the host's cluster and reads its secrets from the
secret store when the pod starts, so after a reboot Grafana stays down (no
login, no dashboards) until the secret store answers; the pod retries and
starts with no manual step. It reads them once: after you replace its OIDC
client secret, the administrator password or the datasources' bearer in the
store, restart it with
`kubectl -n hyperhive rollout restart deployment/swarm-grafana`.
- **It doesn't provision users.** `swarmctl` creates and destroys agents
continuously today, so the subject set belongs to a program rather
than to a config file.