Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/docs/4-implementation/k8s/runtime.md
Author SHA1 Message Date
maia
d390e7a5cc k8s: the store-credential unit starts at fork, off the boot and switch path
`swarm-bao-store-auth` was a retrying oneshot on multi-user.target. A
oneshot's start job stays pending through its restarts, so a boot or a switch
with the secret store sealed waited on it for up to 15 minutes, the same
shape as #6901's CA publisher.

It is now `Type=simple` with the shared retry kept: the start job is done at
fork and the unit keeps trying until the store answers. `RemainAfterExit`
leaves it `active (exited)` once the credential is out, and the 15-minute
start timeout goes, as a start job done at fork has no use for it. Nothing
orders after the unit: the gateway reads the file at its next reload and the
pods wait in ContainerCreating for the Secret.

`is-active` is now true while the script runs and `systemctl restart` returns
at fork, so the k8s-services and k8s-nats tests wait for `SubState=exited` where they relied
on either.

Closes #6937
2026-11-29 14:02:31 +01:00
atlas
746c296945 the queue's exporter asks every request for a login the gateway supplies 2026-11-29 14:02:31 +01:00
atlas
fc832b85f5 the log and metrics stores ask every request for a credential the gateway supplies
Each store runs with -httpAuth.* and a credential from the secret store, published to the namespace as a Secret by the host. The gateway's locations send it after auth_request has passed, and the collector's scrape and push take the same one, so a process on the node that bypasses the gateway is refused.
2026-11-29 14:02:31 +01:00
atlas
ad1ff47b26 run the metrics store and its auth responders as pods 2026-11-29 14:02:31 +01:00
atlas
8a31fc964d k8s: the ca-trust publisher no longer holds multi-user.target while it waits for the setup 2026-11-29 14:02:31 +01:00
atlas
0f67be2163 swarm-nats: the pod's raw rule lets through the interfaces the firewall opens the client port on
The hostPort's raw-table drop for the queue's client port let through only the host's loopback, the bridge and the pods' interfaces, so a hive on another host, reaching the queue over wg0 where the firewall's own rule opens the port, timed out. The rule now also returns for every interface whose networking.firewall.interfaces entry opens the port. semi-spread dumps the queue's network state when the hive cannot reach it, and asserts the port answers over wg0 and not on the public address.
2026-11-29 14:02:31 +01:00
atlas
bf8d77ca86 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-29 14:02:31 +01:00
atlas
b7fc13a345 full-setup and the host swarmctl reach the controller as a pod, not through a host socket 2026-11-29 14:02:31 +01:00
atlas
2b58c769b5 require k8s: swarm services with a pod run in the cluster only 2026-11-29 14:02:31 +01:00
atlas
4dee02c81d pin queue and poller state to per-service node labels instead of the hostname 2026-11-29 14:02:31 +01:00
atlas
a07e50cfe4 remove swarmctl migrate, migrate.json and the migrate docs 2026-11-29 14:02:31 +01:00
atlas
81b8b0a44c 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-29 14:02:31 +01:00
atlas
3bda4399b4 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-29 14:02:31 +01:00
atlas
1c89025ec3 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-29 14:02:31 +01:00
atlas
2b1ff369f4 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-29 14:02:31 +01:00
atlas
e1a8fc0dbf k8s: stt's pod runs in a user namespace of its own 2026-11-29 14:02:31 +01:00
atlas
a06d708746 k8s: stt's pod gets a network policy: dns and four host ports out, nothing in 2026-11-29 14:02:31 +01:00
atlas
713a89dff7 k8s: the controller pod keeps no volume; the state gate goes 2026-11-29 14:02:31 +01:00
atlas
6ea52666d0 k8s: the queue's pod mounts the host unit's store in place 2026-11-29 14:02:31 +01:00
atlas
76d8121503 k8s: stt and ci-metrics start without a state gate 2026-11-29 14:02:31 +01:00
atlas
682ab1ae4f docs: say what the nats pod does and doesn't isolate 2026-11-29 14:02:31 +01:00
atlas
c89883251f docs: the start gate describes what the pod runs 2026-11-29 14:02:31 +01:00
atlas
893b8de168 docs: the queue in the cluster 2026-11-29 14:02:31 +01:00
atlas
4964e05e87 docs: the controller's runtime, hostPort hop, listener leaf, state and rev rollout 2026-11-29 14:02:31 +01:00
atlas
16dbdbbeef docs: the review classifier and the claude login minter run in the cluster with deploy.<service>.runtime 2026-11-29 14:02:31 +01:00
atlas
4ac5fac9fb docs: the CI run poller's runtime, cursor volume, own telemetry route and CA ConfigMap 2026-11-29 14:02:31 +01:00
atlas
b75cc44f09 k8s: a pod's requests are explicit, so its limits cap and reserve nothing 2026-11-29 14:02:31 +01:00
atlas
ea16b03a55 docs: the speech-to-text service's runtime, limits and cache volume 2026-11-29 14:02:31 +01:00
atlas
080ea99a54 k8s: deploy.notify-router.runtime moves the router between its container and the cluster 2026-11-29 14:02:31 +01:00