Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/host-modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 40a2bd047b swarm-nats: forward the queue container's journal to the swarm collector
The swarm-nats container now runs its own otel collector, which reads the
container's journal and pushes it to the swarm collector at
https://<swarm.otel.domain>/swarm-nats, authenticated as the queue's
existing OIDC client (swarm.nats.clientId). Records carry
service.name=nats and no hive label.

The collector lives in a reusable container module,
nix/container-modules/swarm-journal-forwarder.nix, which follows
swarm-bao's forwarder: a journald receiver over /var/log/journal with
merge and a file_storage cursor, an otlphttp exporter with an
oauth2client authenticator that requests its own client id as audience,
self-metrics on a loopback telemetry port, and the client secret handed
in through LoadCredential. Unlike swarm-bao, the secret is fetched inside
the container by swarm-journal-forwarder-oidc.service, under the
container's own store identity (the swarm-nats-auth leaf, which already
holds a read grant on secret/swarm/services/swarm-nats/oidc/client).
The fetch retries until the store answers, and the collector restarts
until the file exists. A 10-minute timer re-reads the secret and restarts
the collector when it changed.

The swarm collector's authenticated producer route was hard-wired to
swarm-bao. It is now rendered from swarm.otel.serviceProducers
(internal), one receiver, oidc authenticator, gateway location and
pipeline entry per service: swarm-bao (port 4391, unchanged names) and
swarm-nats (port 4392). The reserved-fragment and port-collision
assertions cover every entry.

The queue's OIDC client registration gains its own id as audience and
RS256-signed access tokens, which the receiver verifies offline.

swarm-nats drops --link-journal=host, so its journal stays in the guest
where the forwarder reads it, as swarm-bao did in 44009dc51. The new
swarm.nats.otel.telemetryPort (8891) keeps the forwarder off the
collectors' 8888-8890 in the shared host netns, with an assertion.

module-eval-nats-authelia gains four cases: the container's forwarder
and fetch unit on the store host and on a queue-only host, the
responder role's read grant, the swarm collector's swarm-nats receiver
on a host without the queue, and the client registration.

Part of #4499
Part of #5342
2026-10-16 09:08:21 +02:00
..
hive-c0re otel: agents reach their hive's collector by a swarm-wide name 2026-10-16 09:06:41 +02:00
hive-forge forge: hand the OIDC client secret to forgejo from /run, not from the container's disk 2026-10-15 21:21:50 +02:00
hive-gateway gateway: serve the hive dashboard on <hive>.hives.<swarm> behind authelia, drop htpasswd 2026-10-15 21:44:27 +02:00
lib swarm-bao-agent-pki: decide openbao's restart on the shared locale-independent compare 2026-10-13 17:00:56 +02:00
swarm-grafana/dashboards grafana: fold the forge runtime panels into the existing forge dashboard 2026-10-16 02:13:03 +02:00
bao-bootstrap-policy.hcl bao: disable the unused approle auth method, declaratively 2026-09-28 22:58:36 +02:00
default.nix swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
deploy.nix swarm-ui: package option moves to deploy.swarm-controller.ui.package 2026-10-16 00:35:16 +02:00
glue-bao-readers-policy-order.nix swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
glue-bao-readers-store-order.nix swarm UI: an alerts page, read by the controller with a Viewer Grafana token from bao 2026-10-15 15:16:21 +02:00
glue-bao-tls.nix swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
glue-bao-ui-oidc-client.nix bao: OIDC login to the browser UI via authelia, as a metadata-only viewer 2026-09-28 19:56:38 +02:00
glue-builder-oidc-client.nix swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
glue-claude-login-oidc-client.nix swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
glue-controller-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-controller-env.nix glue: the controller's authelia and otel environment moves out of the controller module 2026-10-14 10:15:29 +02:00
glue-controller-oidc-client.nix glue: the controller's authelia and otel environment moves out of the controller module 2026-10-14 10:15:29 +02:00
glue-forge-controller.nix glue: forge's controller-dependent settings move out of the forge module 2026-10-13 22:14:28 +02:00
glue-forge-oidc-client.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-grafana-oidc-client.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-hive-otel-authelia.nix glue: hive-otel's ordering after authelia moves out of the otel module 2026-10-13 22:04:52 +02:00
glue-hive-tls-bao-identity.nix hive-tls: the gateway leaf uses the services-issuer identity, not a hive's 2026-10-06 14:54:07 +02:00
glue-logs-auth-bao-identity.nix swarm-logs-auth: check agent tokens on the log store's query route 2026-10-13 08:38:05 +02:00
glue-matrix-ctl-bao-identity.nix swarm-nats, matrix: the queue's and matrix-ctl's store identity paths are their own, not the hive's 2026-10-06 12:04:48 +02:00
glue-matrix-oidc-client.nix swarm: OIDC clients registered wherever authelia runs; nats + matrix secrets from bao 2026-10-05 09:58:02 +02:00
glue-metrics-auth-bao-identity.nix swarm metrics store: the read API needs Grafana's bearer or an operator session 2026-10-15 10:48:20 +02:00
glue-nats-auth-bao-identity.nix swarm-nats: the auth responder's store identity path is its own, not the hive's 2026-10-06 10:04:30 +02:00
glue-nats-bao-identity.nix swarm-nats, matrix: the queue's and matrix-ctl's store identity paths are their own, not the hive's 2026-10-06 12:04:48 +02:00
glue-nats-oidc-client.nix swarm-nats: forward the queue container's journal to the swarm collector 2026-10-16 09:08:21 +02:00
glue-nats-wireguard.nix glue: nats firewall on the wireguard interface moves out of the nats module 2026-10-14 10:15:19 +02:00
glue-queue-agent-credential.nix swarm-bao-pki: sign every other hive's three store leaves 2026-10-12 21:41:28 +02:00
glue-review-classifier-oidc-client.nix nix: run the review classifier in a container of its own when a host enables it 2026-10-12 13:11:21 +02:00
glue-secret-publisher-authelia.nix glue: the secret publisher's authelia-dependent settings move out of the publisher module 2026-10-14 01:52:53 +02:00
glue-secret-publisher-bao-identity.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
glue-swarm-bao-otel-oidc-client.nix ops: update option pointers after grafana/bao split 2026-10-01 09:53:04 +02:00
glue-swarm-otel-oidc-client.nix ops: update option pointers after otel split 2026-10-01 13:00:40 +02:00
hive-matrix-service.nix hive-matrix: run the homeserver in its own netns, behind a unix socket 2026-10-15 09:52:06 +02:00
hive-matrix.nix hive-matrix: keep tuwunel's OIDC secret on the host's /run, not in the container's root 2026-10-15 23:31:32 +02:00
hive-network.nix nix: run swarm-ui wherever swarm-controller runs 2026-10-13 20:05:19 +02:00
hive-priv.nix swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
hive-tls.nix gateway: serve the hive dashboard on <hive>.hives.<swarm> behind authelia, drop htpasswd 2026-10-15 21:44:27 +02:00
host-ca-removed.nix hive CA: catch a deleted CA file however its path is spelled 2026-10-05 21:17:10 +02:00
hyperhive.nix nix: finish the current-behaviour comment sweep in touched files 2026-10-05 09:58:57 +02:00
local-defaults.nix swarm-nats: take the callout issuer and user keys from the store 2026-10-06 14:53:33 +02:00
nats-callout-removed.nix nats-callout-removed: remove the container's OIDC secret copy here, ungated 2026-10-06 15:25:29 +02:00
otel.nix otel: finish the agent collector name in option and network docs 2026-10-16 09:06:41 +02:00
stylix-theme.nix swarm-ui: apply the operator's stylix theme, same as the dashboard already does 2026-08-24 14:28:25 +02:00
swarm-authelia-service.nix hive-matrix: run the homeserver in its own netns, behind a unix socket 2026-10-15 09:52:06 +02:00
swarm-authelia.nix gateway: serve the hive dashboard on <hive>.hives.<swarm> behind authelia, drop htpasswd 2026-10-15 21:44:27 +02:00
swarm-bao-service.nix nix: split swarm-bao into service and deploy-mode files 2026-10-01 09:37:36 +02:00
swarm-bao.nix grafana: query the log store with the metrics bearer, by its swarm name 2026-10-16 02:38:47 +02:00
swarm-builder.nix swarm-bao-pki: enabling a service mints its client leaf on the same switch 2026-10-15 08:31:33 +02:00
swarm-ci-runner.nix swarm-ci-runner: keep the registration token on the host's /run, not in the container's root 2026-10-15 21:44:46 +02:00
swarm-claude-login.nix swarm containers: run the claude-code the hive pins for agents 2026-10-16 01:29:15 +02:00
swarm-controller.nix gateway: serve the hive dashboard on <hive>.hives.<swarm> behind authelia, drop htpasswd 2026-10-15 21:44:27 +02:00
swarm-grafana-service.nix swarm-otel: scrape grafana through its published name 2026-10-14 23:45:04 +02:00
swarm-grafana.nix grafana: query the log store with the metrics bearer, by its swarm name 2026-10-16 02:38:47 +02:00
swarm-nats-service.nix swarm-nats: forward the queue container's journal to the swarm collector 2026-10-16 09:08:21 +02:00
swarm-nats.nix swarm-nats: forward the queue container's journal to the swarm collector 2026-10-16 09:08:21 +02:00
swarm-otel-service.nix swarm-nats: forward the queue container's journal to the swarm collector 2026-10-16 09:08:21 +02:00
swarm-otel.nix swarm-nats: forward the queue container's journal to the swarm collector 2026-10-16 09:08:21 +02:00
swarm-peers-removed.nix swarm CA: retire the host-held root CA, the store holds the only anchor 2026-10-05 21:17:10 +02:00
swarm-required-services.nix swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
swarm-review-classifier.nix swarm containers: run the claude-code the hive pins for agents 2026-10-16 01:29:15 +02:00
swarm-secret-publisher.nix swarm UI: log an agent into claude from its card; the credentials go to bao and the agent picks them up 2026-10-15 13:26:29 +02:00
swarm-snapshot-store.nix swarm snapshot store: the receiver socket binds the mesh address even when wg-hive comes up after sockets.target 2026-10-15 08:27:54 +02:00
swarm-ui.nix swarm-ui: package option moves to deploy.swarm-controller.ui.package 2026-10-16 00:35:16 +02:00
swarm-victorialogs-service.nix CI and devshell comments say what the config does: jobTimeout bounds jobs, coverage runs nightly, dead timeout keys removed 2026-10-15 08:27:32 +02:00
swarm-victorialogs.nix grafana: query the log store with the metrics bearer, by its swarm name 2026-10-16 02:38:47 +02:00
swarm-victoriametrics-service.nix swarm-victoriametrics: own network namespace, gateway over a unix socket 2026-10-14 18:15:20 +02:00
swarm-victoriametrics.nix swarm metrics store: the read API needs Grafana's bearer or an operator session 2026-10-15 10:48:20 +02:00
swarm-wireguard.nix swarm options: no swarm.* value depends on a deploy option or this host's hive 2026-10-04 18:13:47 +02:00
swarm.nix gateway: serve the hive dashboard on <hive>.hives.<swarm> behind authelia, drop htpasswd 2026-10-15 21:44:27 +02:00