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

@ -1,4 +1,4 @@
# What the Victoria stores' listener credential is, where it lives, and who
# What the listener credential of the Victoria stores and of Grafana is, where it lives, and who
# names it. The store's pod, the gateway's vhost and the unit that mints and
# publishes it (../k8s/store-credentials.nix) all spell it from here.
#
@ -7,6 +7,9 @@
# leaf of the swarm secret store, created by that unit when the store holds
# none. The pod reads it from the Secret `secretName`; nginx sends it in the
# `Authorization` header that `nginxFile` sets.
#
# Grafana asks for the same login on `/metrics` alone (`[metrics] basic_auth_*`);
# its other routes take its own login.
rec {
# The Basic login's user name, the same for every store.
user = "swarm-store";
@ -16,7 +19,7 @@ rec {
credentialId = "store-auth";
# Under KV v2's `secret/` mount, as `bao kv` takes it. `store` is
# `victorialogs` or `victoriametrics`.
# `victorialogs`, `victoriametrics` or `grafana`.
leaf = store: "swarm/services/${store}/store-auth";
# On the host, a directory for root and the gateway's group (`0750`): the nginx