Watch
0
0
Fork
You've already forked hyperhive
0

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:
atlas 2026-11-26 10:17:57 +01:00 • committed by maia
commit 71b2e9310c
2 changed files with 1385 additions and 746 deletions

View file

@ -86,13 +86,25 @@ and the store's granter fetches the bao UI's.
Three services read **every agent's queue secret**
(`swarm/agents/<agent>/queue`), each under a leaf of its own whose policy
reaches that one leaf per agent: the queue's auth callout (`swarm-nats-auth`),
the log store's agent check (`swarm-logs-auth`, on the log store's host), and
the log store's agent check (`swarm-logs-auth`, a pod on the log store's host), and
the metrics store's (`swarm-metrics-agent-auth`, under the `swarm-metrics-auth`
leaf on the metrics store's host). Any one compromised can present any agent's
queue secret, at the queue and at both stores' read routes alike. The two store checks also read the
agent's `swarm/agents/<agent>/observability` leaf, which only the controller writes, and let
the agent through only with the `logs` or `metrics` permission it names.
### The log store takes writes and reads from the node
VictoriaLogs checks no credential: the gateway's vhost does. The store
listens on its pod's address behind a ClusterIP Service, and the Service's
NetworkPolicy admits traffic from the node and from nothing else. A process on
the log store's host, whatever its user, can therefore read every log line and
write records into the store without a bearer. An agent can't: its traffic
doesn't come from the node, and the hive's egress rules don't forward it to the
pod network. Treat the host that runs the log store as trusted for logs. The
metrics store still listens on a unix socket that only the gateway's group can
open.
### Per-hive credentials live under the hive kind
`swarm_secret_client::policy` scopes the **hive** stanza narrowly (unlike the

View file

@ -162,6 +162,9 @@ hive's daemons and the harness units in every agent container.
To read them, open Grafana, pick **Explore** and choose the `VictoriaLogs`
datasource. Agents query it with `swarm-logs`, and need the `logs` permission.
The store runs as a pod in the host's cluster, so `deploy.victorialogs.enable`
turns [the cluster node](../../4-implementation/k8s/node.md) on with it.
| Option | When you'd touch it |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `deploy.victorialogs.retentionPeriod` | Default `30d`, far shorter than the metrics store's. Raise it to answer questions about last quarter. |