run the log store and its auth responders as pods
swarm-logs-auth and swarm-metrics-auth take --listen for a TCP address beside --socket. The log store is a Deployment on a static local volume that is its old container's data directory, behind a ClusterIP Service the gateway dials by name. Its two auth_request responders are one unpinned pod with a jwt role. The renderer gains a plain HTTP listener, a probe path, fsGroupChangePolicy, and one policy for a pod with both a listener and egress.
This commit is contained in:
parent
279f97e5ca
commit
71b2e9310c
1 changed files with 1385 additions and 746 deletions
|
|
@ -189,19 +189,20 @@ swarm.
|
|||
| `deploy.victorialogs.grafanaAuthPackage` | The `swarm-metrics-auth` build that runs as `swarm-logs-grafana-auth`. Set on its own: `deploy.victoriametrics.authPackage` doesn't reach it. |
|
||||
| `swarm.victorialogs.domain` | Only to rename it. |
|
||||
|
||||
It listens on a unix socket in a network namespace of its own, on the hive
|
||||
bridge so its journal forwarder can reach the swarm collector, and binds no host
|
||||
port. Only the gateway's nginx can open the socket. It takes no credential of
|
||||
its own: the gateway vhost is the only way in, and the collector is the only
|
||||
intended writer.
|
||||
It runs as a pod in the host's cluster ([the log store](../k8s/runtime.md#the-log-store))
|
||||
and binds no host port. Its Service takes no credential of its own, so a
|
||||
NetworkPolicy lets only the host's own traffic reach it. The gateway vhost, which
|
||||
dials the Service by name, is the only way in for a hive, an agent or a
|
||||
browser, and the collector is the only intended writer. A process on this host
|
||||
can also reach the Service; see [Agent security](../../2-handbook/agents/security.md).
|
||||
|
||||
**Who may query.** `/select/logsql/` takes one of three credentials. An
|
||||
agent presents its `swarm-agent.<agent>.<secret>` bearer, checked by
|
||||
`swarm-logs-auth`. The agent must also hold the `logs` permission,
|
||||
which is off by default; without it the answer is a 403 (`docs/5-project/process/conventions.md`, Permissions). Grafana's datasource presents the same bearer as its
|
||||
metrics datasource, which `swarm-bao-grafana-metrics-bearer` creates, and a
|
||||
second `swarm-metrics-auth` instance (`swarm-logs-grafana-auth`) on the log
|
||||
store's host checks it against the same store path; the gateway tells it from
|
||||
second `swarm-metrics-auth` instance (`swarm-logs-grafana-auth`, in the same pod as
|
||||
`swarm-logs-auth`) checks it against the same store path; the gateway tells it from
|
||||
the others by its shape, 64 hex digits. Anything else needs an operator's
|
||||
authelia session. Because one bearer opens both read APIs, a rotation
|
||||
(see [`credentials.md`](../../2-handbook/swarm/credentials.md)) restarts Grafana once, and the log store
|
||||
|
|
@ -290,16 +291,16 @@ gateway either way.
|
|||
|
||||
The `swarm-bao`, `swarm-nats`, `swarm-builder`, `swarm-claude-login`,
|
||||
`swarm-notify-router`, `swarm-review-classifier`, `swarm-ci-runner`, `swarm-grafana`,
|
||||
`swarm-victorialogs`, `swarm-victoriametrics`, `swarm-authelia`, `swarm-attic`, `hive-forge`
|
||||
`swarm-victoriametrics`, `swarm-authelia`, `swarm-attic`, `hive-forge`
|
||||
and `hive-matrix` containers each run a collector of their own that forwards the container's
|
||||
journal here, on a route and receiver per service
|
||||
(`https://<swarm.otel.domain>/<container>/`), authenticated as an OIDC client
|
||||
of that service's. The queue, builder, login minter, notification router and
|
||||
classifier reuse the service's own client; the store, CI runner, Grafana, log store, metrics store,
|
||||
classifier reuse the service's own client; the store, CI runner, Grafana, metrics store,
|
||||
authelia, cache, forge and homeserver have a forwarder client of their own
|
||||
(`swarm.<service>.otel.clientId`). Their records carry `service.name` (`bao`,
|
||||
`nats`, `builder`, `claude-login`, `notify-router`, `review-classifier`, `ci-runner`,
|
||||
`grafana`, `victorialogs`, `victoriametrics`, `authelia`, `attic`, `forgejo`,
|
||||
`grafana`, `victoriametrics`, `authelia`, `attic`, `forgejo`,
|
||||
`tuwunel`) and the `sender` of its own client id. The forwarder of all but the store's is
|
||||
`nix/container-modules/swarm-journal-forwarder.nix`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue