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:
parent
26ef09b0d7
commit
9f62e71dae
18 changed files with 1938 additions and 1953 deletions
|
|
@ -59,7 +59,6 @@
|
|||
./glue-stt-oidc-client.nix
|
||||
./glue-attic-otel-oidc-client.nix
|
||||
./glue-forge-otel-oidc-client.nix
|
||||
./glue-grafana-otel-oidc-client.nix
|
||||
./glue-matrix-otel-oidc-client.nix
|
||||
./glue-review-classifier-oidc-client.nix
|
||||
./glue-secret-publisher-authelia.nix
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
# Gated on authelia being HERE, not on this host running the cache: a client is
|
||||
# a row in THIS host's provider config, the split
|
||||
# ./glue-grafana-otel-oidc-client.nix makes for the same reason.
|
||||
# ./glue-forge-otel-oidc-client.nix makes for the same reason.
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ let
|
|||
|
||||
# Reader unit → the gate its own module defines it under.
|
||||
readersHere = {
|
||||
# ./swarm-grafana.nix
|
||||
swarm-bao-grafana-oidc = deployCfg.grafana.enable;
|
||||
# ./swarm-otel.nix
|
||||
swarm-bao-otel-oidc =
|
||||
deployCfg.swarm-otel.enable
|
||||
|
|
@ -46,7 +44,12 @@ let
|
|||
swarm-bao-ci-runner = deployCfg.ci-runner.enable;
|
||||
# ./k8s/store-credentials.nix
|
||||
swarm-bao-store-auth =
|
||||
(deployCfg.victorialogs.enable || deployCfg.victoriametrics.enable || deployCfg.nats.enable)
|
||||
(
|
||||
deployCfg.victorialogs.enable
|
||||
|| deployCfg.victoriametrics.enable
|
||||
|| deployCfg.nats.enable
|
||||
|| deployCfg.grafana.enable
|
||||
)
|
||||
&& deployCfg.k8s.enable
|
||||
&& hyperhiveCfg.k8s.enable
|
||||
&& havePair baoDeploy.storeAuthClientCertFile baoDeploy.storeAuthClientKeyFile;
|
||||
|
|
@ -55,25 +58,6 @@ let
|
|||
# Readers that log in under another unit's principal: reader unit → the
|
||||
# gate its own module defines it under, and the policy units it waits for.
|
||||
readersOfOtherPolicy = {
|
||||
# ./swarm-grafana.nix, under Grafana's leaf, which may create the admin
|
||||
# password, the metrics bearer, the datasource key and the controller's
|
||||
# Grafana token only once that policy is written.
|
||||
swarm-bao-grafana-admin = {
|
||||
here = deployCfg.grafana.enable;
|
||||
policies = [ "swarm-bao-grafana-oidc-policy" ];
|
||||
};
|
||||
swarm-bao-grafana-metrics-bearer = {
|
||||
here = deployCfg.grafana.enable;
|
||||
policies = [ "swarm-bao-grafana-oidc-policy" ];
|
||||
};
|
||||
swarm-bao-grafana-secret-key = {
|
||||
here = deployCfg.grafana.enable;
|
||||
policies = [ "swarm-bao-grafana-oidc-policy" ];
|
||||
};
|
||||
swarm-bao-grafana-controller-token = {
|
||||
here = deployCfg.grafana.enable;
|
||||
policies = [ "swarm-bao-grafana-oidc-policy" ];
|
||||
};
|
||||
# ./swarm-attic.nix, under the cache's leaf, which may create the signing
|
||||
# key, the two tokens and the cache's public facts only once that policy is
|
||||
# written.
|
||||
|
|
|
|||
|
|
@ -56,12 +56,6 @@ let
|
|||
&& hyperhiveCfg.deploy.hive-controller.hiveName != null
|
||||
&& havePair baoDeploy.clientCertFile baoDeploy.clientKeyFile
|
||||
&& otel.clientSecretFile == hiveOtelSecret.path;
|
||||
# ./swarm-grafana.nix
|
||||
swarm-bao-grafana-oidc = deployCfg.grafana.enable;
|
||||
swarm-bao-grafana-admin = deployCfg.grafana.enable;
|
||||
swarm-bao-grafana-metrics-bearer = deployCfg.grafana.enable;
|
||||
swarm-bao-grafana-secret-key = deployCfg.grafana.enable;
|
||||
swarm-bao-grafana-controller-token = deployCfg.grafana.enable;
|
||||
# ./swarm-ci-runner.nix
|
||||
swarm-bao-ci-runner = deployCfg.ci-runner.enable;
|
||||
# ./swarm-attic.nix
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
# Glue: register the Grafana container's journal forwarder as an OIDC
|
||||
# client wherever authelia runs.
|
||||
#
|
||||
# ONE PAIRING PER FILE: that forwarder ← authelia, and nothing else.
|
||||
# Without it authelia mints no secret, the publisher has nothing to copy into
|
||||
# the store, and the forwarder's export is a 401.
|
||||
#
|
||||
# Gated on authelia being HERE, not on this host running Grafana: a
|
||||
# client is a row in THIS host's provider config, the split
|
||||
# ./glue-swarm-bao-otel-oidc-client.nix makes for the same reason.
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hyperhiveCfg = config.services.hyperhive;
|
||||
clientId = hyperhiveCfg.swarm.grafana.otel.clientId;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf hyperhiveCfg.deploy.authelia.enable {
|
||||
services.hyperhive.swarm.authelia.oidc.clients = [
|
||||
{
|
||||
id = clientId;
|
||||
description = "HyperHive Grafana journal forwarder";
|
||||
kind = "machine";
|
||||
redirectUris = [ ];
|
||||
# Its own id as its own permitted audience, the one the swarm
|
||||
# collector's receiver for this container checks.
|
||||
audience = [ clientId ];
|
||||
# The receiver verifies the token offline against `/jwks.json`;
|
||||
# authelia's default opaque handle fails there.
|
||||
accessTokenSignedResponseAlg = "RS256";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -168,6 +168,7 @@ let
|
|||
"swarm-controller"
|
||||
"victorialogs"
|
||||
"victoriametrics"
|
||||
"grafana"
|
||||
];
|
||||
enabledServices = lib.filter (name: deployCfg.${name}.enable) swarmServices;
|
||||
|
||||
|
|
@ -179,6 +180,7 @@ let
|
|||
ci-metrics
|
||||
victorialogs
|
||||
victoriametrics
|
||||
grafana
|
||||
;
|
||||
};
|
||||
in
|
||||
|
|
@ -320,7 +322,7 @@ in
|
|||
none of those pods.
|
||||
|
||||
- `hyperhive.darkest.space/state-<service>` for each service whose data the
|
||||
cluster keeps: `nats`, `ci-metrics`, `victorialogs` and `victoriametrics`, each when enabled. A volume's `nodeAffinity` and the pod's `nodeSelector` name it.
|
||||
cluster keeps: `nats`, `ci-metrics`, `victorialogs`, `victoriametrics` and `grafana`, each when enabled. A volume's `nodeAffinity` and the pod's `nodeSelector` name it.
|
||||
- `hyperhive.darkest.space/entry`: the node the hosts' DNS points at.
|
||||
- `svccontroller.k3s.cattle.io/enablelb`: with it on any node, the
|
||||
service load balancer binds a published port on the labelled nodes
|
||||
|
|
|
|||
|
|
@ -344,6 +344,38 @@ let
|
|||
egress = [ "store" ];
|
||||
otlp = "none";
|
||||
};
|
||||
# Grafana: the swarm's metrics UI, on a static local volume that is its
|
||||
# data directory. Its configuration, provisioning and plugins are in the
|
||||
# image; an init container fetches its secrets and a sidecar keeps the
|
||||
# controller's token (`pod`). It logs in to nothing itself and pushes no
|
||||
# telemetry. The UI and the API take Grafana's own login; its `/metrics`
|
||||
# takes the listener credential.
|
||||
swarm-grafana = {
|
||||
inherit (deployCfg.grafana) enable unit pod;
|
||||
package = deployCfg.grafana.startPackage;
|
||||
kind = "Deployment";
|
||||
healthEnv = null;
|
||||
probe = {
|
||||
path = "/api/health";
|
||||
startupFailureThreshold = 30;
|
||||
};
|
||||
etcFiles = [ ];
|
||||
publicCredentials."bao-ca.pem" = baoServerCaKey;
|
||||
listener.port = deployCfg.grafana.servicePort;
|
||||
# The secret store, and the gateway's 443: authelia's token and userinfo
|
||||
# routes and both datasources.
|
||||
egress = [
|
||||
"store"
|
||||
"identity"
|
||||
];
|
||||
baoRole = "swarm-grafana-oidc";
|
||||
localState = {
|
||||
service = "grafana";
|
||||
hostDir = deployCfg.grafana.hostDataDir;
|
||||
};
|
||||
fsGroupChangePolicy = "OnRootMismatch";
|
||||
otlp = "none";
|
||||
};
|
||||
};
|
||||
|
||||
# Where a pod pushes telemetry. A `"hive"` service pushes to the hive
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# The listener credentials of the Victoria stores the cluster runs and of the
|
||||
# queue's exporter: the unit that creates each in the swarm secret store when it
|
||||
# The listener credentials of the Victoria stores and Grafana the cluster runs and
|
||||
# of the queue's exporter: the unit that creates each in the swarm secret store when it
|
||||
# holds none, hands it to the gateway's nginx and publishes it to the cluster as
|
||||
# the Secret the pod reads it from (the store's password, the exporter's bcrypt
|
||||
# hash). The stores' flags and the locations that send the credential are in
|
||||
# ../swarm-victorialogs.nix and ../swarm-victoriametrics.nix, the exporter's in
|
||||
# ../swarm-nats.nix; ../lib/store-auth.nix names what they share.
|
||||
# hash). The flags and the locations that send the credential are in
|
||||
# ../swarm-victorialogs.nix, ../swarm-victoriametrics.nix and ../swarm-grafana.nix,
|
||||
# the exporter's in ../swarm-nats.nix; ../lib/store-auth.nix names what they share.
|
||||
# docs/4-implementation/k8s/runtime.md has the design.
|
||||
{
|
||||
pkgs,
|
||||
|
|
@ -27,10 +27,11 @@ let
|
|||
# the files `include`d into the store locations.
|
||||
nginxGroup = config.services.nginx.group;
|
||||
|
||||
# The stores this host runs, by the name `store-auth.nix` takes.
|
||||
# The pods this host runs that take the credential, by the name `store-auth.nix` takes.
|
||||
stores =
|
||||
lib.optional deployCfg.victorialogs.enable "victorialogs"
|
||||
++ lib.optional deployCfg.victoriametrics.enable "victoriametrics";
|
||||
++ lib.optional deployCfg.victoriametrics.enable "victoriametrics"
|
||||
++ lib.optional deployCfg.grafana.enable "grafana";
|
||||
|
||||
# The queue's exporter runs in the queue's pod.
|
||||
exporterOn = deployCfg.nats.enable;
|
||||
|
|
@ -96,7 +97,7 @@ in
|
|||
];
|
||||
|
||||
systemd.services.swarm-bao-store-auth = lib.mkIf haveIdentity {
|
||||
description = "create the Victoria stores' and the queue exporter's listener credentials in the swarm secret store if absent, and publish them";
|
||||
description = "create the stores', Grafana's and the queue exporter's listener credentials in the swarm secret store if absent, and publish them";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [
|
||||
|
|
@ -216,7 +217,7 @@ in
|
|||
store_init
|
||||
store_login
|
||||
if [ "$STORE_UP" != 1 ]; then
|
||||
echo "could not log in to the swarm secret store; the stores' credentials are not published." >&2
|
||||
echo "could not log in to the swarm secret store; the listener credentials are not published." >&2
|
||||
exit 1
|
||||
fi
|
||||
${lib.concatMapStrings publish stores}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -85,23 +85,20 @@ let
|
|||
# below takes a list either way and the units stay identical apart from
|
||||
# the objects they write.
|
||||
#
|
||||
# Grafana's leaf also creates its admin password (`swarm-bao-grafana-admin`
|
||||
# in ./swarm-grafana.nix) and the bearer its metrics datasource presents
|
||||
# (`swarm-bao-grafana-metrics-bearer`) and its datasource-encryption key
|
||||
# (`swarm-bao-grafana-secret-key`). `create` without `update`, so a stored
|
||||
# value is never replaced.
|
||||
# Grafana's pod logs in under this role. It creates its admin password, the
|
||||
# bearer its datasources present and its datasource-encryption key
|
||||
# (`swarm-grafana-fetch` in ./swarm-grafana.nix), `create` without `update`, so a
|
||||
# stored value is never replaced.
|
||||
#
|
||||
# The controller's Grafana token is the one it may replace:
|
||||
# `swarm-bao-grafana-controller-token` mints a new one when Grafana refuses
|
||||
# the stored one, as it does after its database is recreated.
|
||||
# The controller's Grafana token is the one it may replace: its sidecar mints a
|
||||
# new one when Grafana refuses the stored one, as it does after its database
|
||||
# is recreated.
|
||||
grafanaOidcReaders = [
|
||||
{
|
||||
name = "swarm-grafana-oidc";
|
||||
cn = baoDeploy.grafanaOidcCommonName;
|
||||
policyText =
|
||||
readStanza "${credentialMountPath}/data/swarm/services/${hyperhiveCfg.swarm.grafana.oidc.clientId}/oidc/client"
|
||||
# The journal forwarder in its container, under this same leaf.
|
||||
+ readStanza "${credentialMountPath}/data/swarm/services/${hyperhiveCfg.swarm.grafana.otel.clientId}/oidc/client"
|
||||
+ createStanza "${credentialMountPath}/data/${grafanaAdminLeaf}"
|
||||
+ createStanza "${credentialMountPath}/data/${grafanaMetricsBearerLeaf}"
|
||||
+ createStanza "${credentialMountPath}/data/${grafanaSecretKeyLeaf}"
|
||||
|
|
@ -362,11 +359,11 @@ let
|
|||
}
|
||||
];
|
||||
|
||||
# The unit that publishes the stores' listener credentials
|
||||
# The unit that publishes the stores' and Grafana's listener credentials
|
||||
# (`swarm-bao-store-auth`, ./k8s/store-credentials.nix): it creates each
|
||||
# credential when the store holds none and reads it back, `create` without
|
||||
# `update`, so a stored value is never replaced. One principal for both
|
||||
# stores and the queue's exporter, a leaf each.
|
||||
# `update`, so a stored value is never replaced. One principal for the
|
||||
# stores, Grafana and the queue's exporter, a leaf each.
|
||||
storeAuthWriters = [
|
||||
{
|
||||
name = "swarm-store-auth";
|
||||
|
|
@ -376,6 +373,7 @@ let
|
|||
[
|
||||
"victorialogs"
|
||||
"victoriametrics"
|
||||
"grafana"
|
||||
]
|
||||
+ createReadStanza "${credentialMountPath}/data/${storeAuth.exporter.leaf}";
|
||||
}
|
||||
|
|
@ -441,6 +439,9 @@ let
|
|||
# The metrics store's two responders, likewise under the ServiceAccount of
|
||||
# their pod (./k8s/render.nix, `swarm-metrics-auth`).
|
||||
++ metricsAuthReaders
|
||||
# Grafana's pod runs under the ServiceAccount of its service, `swarm-grafana`,
|
||||
# and logs in under the role its certificate has always had.
|
||||
++ map (obj: obj // { serviceAccount = grafanaPodAccount; }) grafanaOidcReaders
|
||||
++ [ { name = controllerPolicyName; } ]
|
||||
# The queue's pod holds both of its roles under one ServiceAccount: the
|
||||
# server's leaf is issued with `swarm-nats`, and the responder reads its
|
||||
|
|
@ -453,6 +454,10 @@ let
|
|||
# it: the pod is the service `swarm-nats`.
|
||||
natsPodAccount = "swarm-nats";
|
||||
|
||||
# The ServiceAccount Grafana's pod runs under: the pod is the service
|
||||
# `swarm-grafana`.
|
||||
grafanaPodAccount = "swarm-grafana";
|
||||
|
||||
# The jwt role of one principal: the token of exactly its ServiceAccount (the
|
||||
# one of its name, unless the record names another), for this store's
|
||||
# audience. Both the subject and the audience are bound, so a
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ in
|
|||
services.hyperhive.gateway.enable = lib.mkDefault true;
|
||||
services.hyperhive.gateway.dns.enable = lib.mkDefault true;
|
||||
|
||||
# Shaped after ./swarm-grafana.nix's `swarm-bao-grafana-oidc`, except that
|
||||
# Shaped after the forge's `swarm-bao-forge-oidc`, except that
|
||||
# a missing token fails too: swarm-controller publishes it at its start and
|
||||
# every five minutes, so a retry is what turns "no value there" into one.
|
||||
systemd.services.swarm-bao-ci-runner = {
|
||||
|
|
|
|||
|
|
@ -1145,8 +1145,8 @@ in
|
|||
SWARM_CONTROLLER_MATRIX_ADMIN_SYNC_IGNORE_USERS = lib.concatStringsSep " " deployCfg.swarm-controller.matrixAdminSync.ignoreUsers;
|
||||
# Where `GET /api/alerts` reads alerts (swarm-controller/src/observability/alerts.rs).
|
||||
# Every swarm has one Grafana, reached by name wherever it runs. The
|
||||
# token is in the store, written by `swarm-bao-grafana-controller-token`
|
||||
# on Grafana's host.
|
||||
# token is in the store, written by the `controller-token`
|
||||
# container of Grafana's pod.
|
||||
SWARM_CONTROLLER_GRAFANA_URL = "https://${swarmCfg.grafana.domain}";
|
||||
# The names squid allows every authenticated agent by default. The
|
||||
# allow-list route refuses them as entries
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# The swarm's metrics UI as every hive sees it: the name it is served under
|
||||
# and the OIDC client it is registered as, identical on every host. What the
|
||||
# host running it decides, and the container itself, are in
|
||||
# host running it decides, and its pod, are in
|
||||
# ./swarm-grafana.nix.
|
||||
{
|
||||
lib,
|
||||
|
|
@ -23,38 +23,9 @@ in
|
|||
# Here is what the service IS to every hive: the name it is served under
|
||||
# and the OIDC client it is registered as. What the host running it
|
||||
# decides — which build it runs, where its datasources point, which plugins
|
||||
# are in its store path, and the socket directory it shares with nginx — is
|
||||
# are in its store path — is
|
||||
# `deploy.grafana`, in ./swarm-grafana.nix.
|
||||
options.services.hyperhive.swarm.grafana = {
|
||||
machine = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
readOnly = true;
|
||||
default = "swarm-grafana";
|
||||
description = ''
|
||||
Container name. Read-only: the name appears in host paths and in
|
||||
`machinectl`, so it is a fact other modules may read rather than a
|
||||
knob.
|
||||
'';
|
||||
};
|
||||
|
||||
otel.clientId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
readOnly = true;
|
||||
default = "swarm-grafana-collector";
|
||||
description = ''
|
||||
OAuth2 client id the journal forwarder inside Grafana's container
|
||||
authenticates as, and the audience it asks its token for. Its own,
|
||||
not {option}`services.hyperhive.swarm.grafana.oidc.clientId`, which
|
||||
is the browser login's.
|
||||
|
||||
Read-only because three hosts have to agree on it: authelia
|
||||
registers the client (`glue-grafana-otel-oidc-client.nix`), the
|
||||
swarm collector admits it on the container's receiver
|
||||
(`swarm.otel.serviceProducers`), and authelia's mint stores
|
||||
its secret in the store.
|
||||
'';
|
||||
};
|
||||
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "grafana.${domainBase}";
|
||||
|
|
@ -98,8 +69,8 @@ in
|
|||
OAuth callback authelia sends the browser back to, and the URI it
|
||||
matches **exactly**.
|
||||
|
||||
Read-only, like {option}`services.hyperhive.swarm.grafana.machine`
|
||||
and for the same reason: Grafana derives it from its own
|
||||
Read-only
|
||||
because Grafana derives it from its own
|
||||
`root_url` (`<root_url>/login/generic_oauth`), so it is a fact
|
||||
other modules may read rather than a knob. The glue that registers
|
||||
this client wherever authelia runs reads it from here instead of
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -242,17 +242,14 @@ in
|
|||
swarm-stt = {
|
||||
clientId = hyperhiveCfg.swarm.stt.clientId;
|
||||
};
|
||||
# The forwarders in ./swarm-attic.nix, ./swarm-ci-runner.nix and
|
||||
# ./swarm-grafana.nix, each authenticated as a client of its own.
|
||||
# The forwarders in ./swarm-attic.nix and ./swarm-ci-runner.nix, each
|
||||
# authenticated as a client of its own.
|
||||
swarm-attic = {
|
||||
clientId = hyperhiveCfg.swarm.attic.otel.clientId;
|
||||
};
|
||||
swarm-ci-runner = {
|
||||
clientId = hyperhiveCfg.swarm.ci-runner.otel.clientId;
|
||||
};
|
||||
swarm-grafana = {
|
||||
clientId = hyperhiveCfg.swarm.grafana.otel.clientId;
|
||||
};
|
||||
# The forwarders in ./hive-forge/default.nix and ./hive-matrix.nix, each
|
||||
# authenticated as a client of its own.
|
||||
hive-forge = {
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ let
|
|||
# journal in the guest, so the host directory holds the host's units only.
|
||||
# Every container with a `serviceProducers` entry (`swarm-bao`, `swarm-nats`,
|
||||
# `swarm-builder`, `swarm-claude-login`, `swarm-notify-router`,
|
||||
# `swarm-review-classifier`, `swarm-ci-runner`, `swarm-grafana`,
|
||||
# `swarm-review-classifier`, `swarm-ci-runner`,
|
||||
# `hive-forge`, `hive-matrix`, `swarm-authelia`, `swarm-attic`) forwards its own
|
||||
# journal from its own collector, so this receiver never sees their units.
|
||||
hostJournalDir = "/var/log/journal";
|
||||
|
|
|
|||
|
|
@ -55,12 +55,11 @@ let
|
|||
hyperhiveCfg.swarm.notify-router.clientId
|
||||
# The speech-to-text service, which reads it itself inside its container.
|
||||
hyperhiveCfg.swarm.stt.clientId
|
||||
# The journal forwarders in the CI runner's, Grafana's, the cache's, the
|
||||
# The journal forwarders in the CI runner's, the cache's, the
|
||||
# forge's and the homeserver's containers, each reading it inside its
|
||||
# container.
|
||||
hyperhiveCfg.swarm.attic.otel.clientId
|
||||
hyperhiveCfg.swarm.ci-runner.otel.clientId
|
||||
hyperhiveCfg.swarm.grafana.otel.clientId
|
||||
hyperhiveCfg.swarm.forge.otel.clientId
|
||||
hyperhiveCfg.swarm.matrix.otel.clientId
|
||||
# The CI run poller, which reads it itself on its host.
|
||||
|
|
|
|||
Loading…
Reference in a new issue