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

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.