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

@ -117,9 +117,8 @@ let
collectorServiceName = "bao";
# Upstream's own default, kept so its documentation matches. The raft data
# lives INSIDE the container on `ephemeral = false`, the same way
# ./swarm-grafana.nix keeps its sqlite database — no sibling service binds
# its state out to the host.
# lives INSIDE the container on `ephemeral = false`; no container of
# the swarm binds its state out to the host.
#
# ⚠️ Do not bind-mount this path. Upstream pairs `StateDirectory=` with
# `DynamicUser=`, which makes systemd hold the state at
@ -1799,7 +1798,8 @@ in
example = "swarm-bao-grafana-oidc.svc";
description = ''
Subject the store's `swarm-grafana-oidc` cert-auth role accepts — the
identity the unit that fetches Grafana's OIDC client secret presents.
identity the fetch of Grafana's OIDC client secret presents; the pod's
`swarm-grafana-oidc` jwt role carries the same policy.
Its grant is one path,
`swarm/services/<grafana client id>/oidc/client`, and read only. Not
@ -2051,11 +2051,12 @@ in
default = "swarm-store-auth";
description = ''
Subject the store's `swarm-store-auth` cert-auth role accepts: the
identity the unit that publishes the log store's, the metrics store's and the
queue exporter's listener credentials presents from the host
(./k8s/store-credentials.nix). Its grant is create and read on
identity the unit that publishes the log store's, the metrics store's,
Grafana's and the queue exporter's listener credentials presents from the
host (./k8s/store-credentials.nix). Its grant is create and read on
`swarm/services/victorialogs/store-auth`,
`swarm/services/victoriametrics/store-auth` and
`swarm/services/victoriametrics/store-auth`,
`swarm/services/grafana/store-auth` and
`swarm/services/nats/exporter-auth`, and nothing else.
⚠️ Reserved as a hive name by ./swarm.nix, like its siblings.