Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/docs
Author SHA1 Message Date
atlas
6b574ab437 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.
2026-11-30 22:19:38 +01:00
atlas
7cfeffa262 swarmctl: drop the controller socket target, the host has no socket to reach 2026-11-30 22:19:18 +01:00
atlas
dda7b9f39a full-setup and the host swarmctl reach the controller as a pod, not through a host socket 2026-11-30 22:19:18 +01:00
atlas
6566cb95f3 k8s vm tests: create the agent netns before k3s starts a pod, and delete pods strictly again 2026-11-30 22:19:18 +01:00
atlas
8bf28077ad k8s-join: wait through a pull from a peer that fails first, and print the registry state when it keeps failing 2026-11-30 22:19:18 +01:00
atlas
fc2b34488b require k8s: swarm services with a pod run in the cluster only 2026-11-30 22:19:18 +01:00
atlas
5e0ab15fa5 let a second machine join the main node's k3s and run pods from images only the main node holds 2026-11-30 22:17:18 +01:00
atlas
1df8b50436 pin queue and poller state to per-service node labels instead of the hostname 2026-11-30 22:17:18 +01:00
maia
03751253bb node.md: keep the punctuation outside quotes out of the new sentence 2026-11-30 22:17:18 +01:00
maia
a861bd0e04 swarmctl setup status: show the pending bootstrap re-run for the pods' login
`swarm-bao-k8s-jwt-policy` exits 0 when the bootstrap token lacks
`sys/auth/jwt-k8s`, so a store set up before the node looked fine in
`swarmctl setup status`: the unit is active and nothing marks the root-only
`swarmctl bao grant-bootstrap` re-run as pending.

The unit now keeps /run/swarm-bao-k8s-jwt-pending while it stays off and
removes it before it writes the mount's config. `setup status` reads the file
and shows step 3, "granter bootstrapped", as not done, naming the verb.
`module-eval-k8s` pins the order of the touch, the exit and the removal.
2026-11-30 22:17:18 +01:00
maia
87ee5fe49c docs: turning the node on restarts the store, so unseal before the re-grant
node.md named the second grant-bootstrap and nothing before it. The
first activation with deploy.k8s.enable adds a pod listener to the
store's configuration, which restarts container@swarm-bao. A shamir
store comes back sealed, the units that read it fail, and
grant-bootstrap cannot log in until an operator unseals it. A pkcs11
store unseals itself.

node.md now has the order for a swarm that already runs: unseal on a
shamir store, then grant-bootstrap once, then restart the policy units,
as setup.md does. Only node.md changes.

Closes #6844
2026-11-30 22:17:18 +01:00
atlas
a227bb8a91 remove swarmctl migrate, migrate.json and the migrate docs 2026-11-30 22:17:17 +01:00
atlas
23fef564f4 k8s: the hyperhive namespace enforces pod security restricted
No pod in the namespace has a hostPort any more, and the census found nothing else that restricted refuses. The namespace now carries the restricted level for enforce, warn and audit, so the API server refuses a pod that drifts. The bao-login test's probe pods get the container security context restricted asks for. The controller switch test shows the API server admitting a compliant pod and refusing the same pod with a host port, a kept capability or privilege.
2026-11-30 22:17:17 +01:00
atlas
57be420390 k8s: the queue's client port is a loadbalancer service
The queue's client port was a hostPort on 0.0.0.0, which Pod Security baseline and restricted forbid. It is a LoadBalancer Service now, which k3s's service load balancer binds on every address of the node with a hostPort of its own in kube-system, so hives on other hosts keep their URL. No node port is allocated. The stt policy allows the load balancer's pods in place of the queue's, and the prune unit waits for them to go before the host unit starts. The egress published-port rule and the raw-table rules apply to the load balancer's hostPort as to the pod's.
2026-11-30 22:17:17 +01:00
atlas
fb6e63f40e egress: the forward chain accepts the flows the host publishes for the agents
On a host with the egress intercept on, the forward chain rejected an agent's traffic to the queue once the queue ran as a pod: the pod's hostPort rewrites the destination to the pod, and the packet then leaves the bridge for the cluster. The chain now accepts TCP that the host's NAT redirected whose original destination is the bridge's address at a published port, which the queue adds when it runs in the cluster. Everything else from the bridge to the cluster stays refused. The nats switch test runs with the intercept on.
2026-11-30 22:17:17 +01:00
atlas
9fdb62cee7 k8s: the queue's exporter is a ClusterIP service only the node reaches
The exporter's metrics port was a hostPort on the bridge's address, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, and the pod has a NetworkPolicy that admits the client port from any source and nothing else, so only the node reads the exporter, as the raw-table rules made it. The gateway's /metrics location dials the Service by name through nginx's resolver. The raw-table rules no longer name the exporter's port.
2026-11-30 22:17:17 +01:00
atlas
13701363a1 k8s: the controller's listener is a ClusterIP service the host dials by name
The controller's api port was a hostPort on the node, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, behind a NetworkPolicy that admits only the node. The host's resolver (the hive's dnsmasq) forwards cluster.local to CoreDNS, and the gateway dials the Service by name through nginx's resolver. tcp.hostAddress goes.
2026-11-30 22:17:17 +01:00
atlas
5e90a88b13 k8s: stt's pod runs in a user namespace of its own 2026-11-30 22:17:17 +01:00
atlas
973fac1889 k8s: stt's pod gets a network policy: dns and four host ports out, nothing in 2026-11-30 22:17:17 +01:00
atlas
d855805c2b k8s: the controller pod keeps no volume; the state gate goes 2026-11-30 22:17:17 +01:00
atlas
55ba905259 k8s: the queue's pod mounts the host unit's store in place 2026-11-30 22:17:17 +01:00
atlas
6858496cad k8s: stt and ci-metrics start without a state gate 2026-11-30 22:17:17 +01:00
atlas
2bd27a909b docs: migrate status reads the gate from the pod's status 2026-11-30 22:17:17 +01:00
atlas
f72bb9e23e docs: say what the nats pod does and doesn't isolate 2026-11-30 22:17:16 +01:00
atlas
3588b5a854 docs: the start gate describes what the pod runs 2026-11-30 22:17:16 +01:00
atlas
ec1e1dd125 docs: the queue in the cluster 2026-11-30 22:17:16 +01:00
atlas
ac86631a2f docs: the controller's runtime, hostPort hop, listener leaf, state and rev rollout 2026-11-30 22:15:10 +01:00
atlas
783687f69d docs: the review classifier and the claude login minter run in the cluster with deploy.<service>.runtime 2026-11-30 22:15:10 +01:00
atlas
fc246360e3 docs: the CI run poller's runtime, cursor volume, own telemetry route and CA ConfigMap 2026-11-30 22:15:09 +01:00
atlas
57bf2dfac6 k8s: a pod's requests are explicit, so its limits cap and reserve nothing 2026-11-30 22:15:09 +01:00
atlas
754f6376df docs: the speech-to-text service's runtime, limits and cache volume 2026-11-30 22:15:09 +01:00
atlas
d750d848eb k8s: deploy.notify-router.runtime moves the router between its container and the cluster 2026-11-30 22:15:09 +01:00
atlas
31b938e084 k8s: a pod's public CA files come from a ConfigMap, not a Secret 2026-11-30 22:15:09 +01:00
atlas
6e59393830 k8s: pods log in to the secret store with their ServiceAccount token
The store gets a listener for the pods that asks for no client certificate,
open on the pod network's interfaces only, and a jwt auth mount with one
role per in-cluster service. The rendered pods run under a ServiceAccount
with a projected token in place of their client certificate.
2026-11-30 22:15:09 +01:00
atlas
5e4544b729 vm-tests: a running collector keeps its cursor when it switches to the static user 2026-11-30 22:15:09 +01:00
atlas
75b65d6719 k8s: pod logs and metrics reach the hive collector 2026-11-30 22:15:09 +01:00
atlas
f55068db28 k8s: pods resolve the swarm names of host-run services to the hive bridge 2026-11-30 22:15:09 +01:00
atlas
874da3358a vm-tests: k8s-node boots a node through deploy.k8s.enable 2026-11-30 22:15:09 +01:00
atlas
8fe2be87e7 k8s: deploy.k8s.enable runs a single-node k3s that holds the service images 2026-11-30 22:15:09 +01:00
atlas
258a232a7e docs: describe swarmctl migrate, the all-local swarm's move onto k8s 2026-11-30 22:15:09 +01:00
atlas
5a628a1edb k8s: render the in-cluster services' manifests from their units
services.hyperhive.k8s.enable renders a Deployment (swarm-controller,
swarm-notify-router) or CronJob (swarm-ci-metrics) per service this host
deploys into system.build.k8sManifests. The renderer reads each evaluated
unit: its environment, LoadCredential ids, state and runtime directories,
ExecStart and timer. Files the unit names are mounted at the same paths, so
the environment carries over as it is. Secrets are referenced by name only.

No unit changes. checks: k8s-manifests-all-local (kubeconform -strict,
offline schemas) and module-eval-k8s; the allLocal fixture turns the
rendering on.
2026-11-30 22:15:09 +01:00
atlas
b9033251ba vm-tests: a k3s node harness, and the swarm images boot as pods 2026-11-30 22:15:09 +01:00
maia
d5f5ee21be swarm-nats-auth: refuse a service client id that fits a hive or a second role 2026-11-30 21:59:38 +01:00
atlas
790cdd43c8 gateway: answer 503 for a store outage and 429 for the rate limit, and retry both in swarm-logs and swarm-metrics 2026-11-30 21:34:53 +01:00
maia
d3c084a0e3 swarm-authelia-bridge: check the username charset of the user being written
publish -> render_yaml -> validate re-checked validate_username on every user
in the file, humans included. authelia accepts names the charset refuses
(first.last@corp), so one hand-added user made every EnsureAgentIdentity fail
with a 500 until it was removed, while readiness (which only parsed the file)
stayed green. The reserved-name guard already avoids this hazard.

validate now checks only what a write would emit wrong (control characters),
for every user. The charset check stays on the name a request writes, in
handle. A user outside the charset is passed through unchanged and named in a
warn line on each write. Readiness now also runs that check, so a file the
bridge cannot render is not ready.
2026-11-30 19:23:38 +01:00
maia
31274ebf7f swarm-nats-auth: fix four doc comments, and record why the request goes unchecked
- request.rs pointed at module docs on main.rs for why the request signature
  is not verified; they said nothing. It now says why, here and in
  docs/4-implementation/swarm/credentials.md ("What authenticates a callout
  request"), and so do xkey::open and main.rs's module docs: only the
  responder's own key can publish to the request subject, a forger with a
  valid bearer gets what a normal connect gets, and nats-server makes a new
  xkey at each start and has no option to set it, so there is no key to pin.
  The guard is the module-eval case "the callout account has exactly one member
  and no system account is configured"; the docs say to revisit this if that
  changes.
- request.rs said base64url is written out rather than pulled in; it calls
  data_encoding, a direct dependency.
- respond.rs said `now` is injected into sign(); sign() takes no clock.
- oidc_secret.rs named swarm-bao.nix for natsAuthReaders; it is in
  swarm-bao-readers.nix.
2026-11-30 17:09:20 +01:00
iris
c0f6118c78 swarm-ui: an open agent's details close with a cross in the identity card
The "← agents" button sat on a row of its own above the card and read as a
stray control, and "back" was the wrong word beside a visible list. The card's
top line now ends in a close cross (the shared Badge with the close icon, as in
the group page's panes), at every width. A name the roster doesn't have keeps
the "← agents" button, since there is no card to carry the cross.
2026-11-30 12:45:37 +01:00
maia
93ccd11bf3 hive-matrix: tuwunel's database open logs RocksDB's own messages
tuwunel hands RocksDB's log to its own logger at `rocksdb_log_level = "error"`,
so the recovery and flush lines of a database open never reached the journal:
a replay that has run for hours looked the same as a wedged open. The module
sets `rocksdb_log_level = "info"` and `rocksdb_log_stderr = true`, which writes
them to stderr, past tracing's filter.

The comment on the unit's start limit said the 30 minutes bound the open.
They don't: tuwunel sends `EXTEND_TIMEOUT_USEC` every 15 s whether or not the
open advanced, so only a stop ends a wedged one. The comment and the handbook
say so.

Refs #6885
Closes #6981
2026-11-28 17:08:09 +01:00
maia
3919de6358 fix(matrix): queue tuwunel's start after the guest's boot is over
The deferred starter was a oneshot that ran `systemctl start --no-block
tuwunel` inside the boot transaction. A --no-block start still queues a
start job, so the guest's job queue stayed non-empty for as long as
tuwunel's start took, and the container (Type=notify, --notify-ready=yes,
one minute) never reported ready and was killed at its limit.

The starter is now Type=simple, so its own start job ends at the fork. It
waits for `systemctl is-system-running --wait` and only then queues the
service. The VM test waits for the daemon to reach `activating` instead of
asserting it the moment the container's start ends.
2026-11-28 09:48:50 +01:00
atlas
ba0f9c6264 start tuwunel after the container is up, under its own 30 min limit 2026-11-28 09:48:50 +01:00