Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/nix/host-modules/k8s
Author SHA1 Message Date
atlas
8cfd52cd4c move flannel's wireguard port to 51830, advertise the node address as the tunnel endpoint, drop the 51820 assertion 2026-11-28 09:59:25 +01:00
atlas
44ae81470e run flannel's wireguard-native backend on every k8s node 2026-11-28 09:59:25 +01:00
maia
e8dc0ebac4 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-28 09:59:25 +01:00
atlas
da53e19636 the queue's exporter asks every request for a login the gateway supplies 2026-11-28 09:59:25 +01:00
atlas
9b12532fc1 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-28 09:59:25 +01:00
atlas
681426b53b run the metrics store and its auth responders as pods 2026-11-28 09:59:25 +01:00
atlas
d579c54f82 k8s: deny ingress to every pod by default 2026-11-28 09:59:20 +01:00
atlas
dd55750b8d k8s: the ca-trust publisher no longer holds multi-user.target while it waits for the setup 2026-11-28 09:59:20 +01:00
maia
286081d43a k8s: refuse a workload name that starts with the legacy hive- prefix
The forge and matrix services carry a hive- prefix from their per-hive
container days. Neither runs in the cluster on k8s/v1 yet, so nothing
is renamed here: the renderer now fails the evaluation of any in-cluster
workload that carries a name starting with hive- (an object key, an
object's name, or its app label), so the move cannot bring the prefix
along. A module-eval case pins the lookup on literals and holds the
rendered hosts to it.
2026-11-28 09:59:20 +01:00
atlas
c9da6e7506 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-28 09:59:20 +01:00
atlas
57d40ae8ea require k8s: swarm services with a pod run in the cluster only 2026-11-28 09:59:10 +01:00
atlas
272af0b3e8 let a second machine join the main node's k3s and run pods from images only the main node holds 2026-11-28 09:59:10 +01:00
atlas
354354859f pin queue and poller state to per-service node labels instead of the hostname 2026-11-28 09:59:10 +01:00
atlas
b4c788b274 remove swarmctl migrate, migrate.json and the migrate docs 2026-11-28 09:59:09 +01:00
atlas
b7ce9ce661 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-28 09:59:09 +01:00
atlas
44aecd6368 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-28 09:59:09 +01:00
atlas
8de33b7212 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-28 09:59:09 +01:00
atlas
7a45c7f1b4 k8s: stt's pod runs in a user namespace of its own 2026-11-28 09:59:09 +01:00
atlas
975d4941ef k8s: stt's pod gets a network policy: dns and four host ports out, nothing in 2026-11-28 09:59:09 +01:00
atlas
a8ed3d96e9 k8s: the controller pod keeps no volume; the state gate goes 2026-11-28 09:59:09 +01:00
atlas
72d9cf93ef k8s: the queue's pod mounts the host unit's store in place 2026-11-28 09:59:09 +01:00
atlas
658c7fe384 k8s: stt and ci-metrics start without a state gate 2026-11-28 09:59:09 +01:00
atlas
cb0a70fe14 nix: render migrate.json and wrap swarmctl with kubectl 2026-11-28 09:59:09 +01:00
atlas
eeb69f07a1 a pod with a state volume starts only on a migrated or fresh volume 2026-11-28 09:59:09 +01:00
atlas
64016a2740 nats: runtime k8s runs the queue and its auth callout as one pod 2026-11-28 09:59:09 +01:00
atlas
3d651d9b26 module-eval: the controller's runtime, hostPort hop, listener leaf and rev rollout 2026-11-28 09:59:09 +01:00
atlas
452f1af675 k8s: deploy.swarm-controller.runtime moves the controller between its unit and the cluster 2026-11-28 09:59:08 +01:00
atlas
b2e9e81320 k8s: deploy.review-classifier.runtime and deploy.claude-login.runtime move the claude daemons between their containers and the cluster 2026-11-28 09:59:08 +01:00
atlas
6bb155e5cf k8s: deploy.ci-metrics.runtime moves the CI run poller between its timer and the cluster 2026-11-28 09:59:08 +01:00
atlas
a542498510 k8s: a pod's requests are explicit, so its limits cap and reserve nothing 2026-11-28 09:59:08 +01:00
atlas
609a22a656 k8s: deploy.stt.runtime moves the speech-to-text service between its container and the cluster 2026-11-28 09:59:08 +01:00
atlas
0a65778c85 k8s: deploy.notify-router.runtime moves the router between its container and the cluster 2026-11-28 09:59:08 +01:00
atlas
d4eab3348c k8s: a pod's public CA files come from a ConfigMap, not a Secret 2026-11-28 09:59:08 +01:00
atlas
e5a863ce79 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-28 09:59:08 +01:00
atlas
96b2634a4e k8s: pod logs and metrics reach the hive collector 2026-11-28 09:59:08 +01:00
atlas
c316851466 k8s: pods resolve the swarm names of host-run services to the hive bridge 2026-11-28 09:59:08 +01:00
atlas
408cfa7353 k8s: deploy.k8s.enable runs a single-node k3s that holds the service images 2026-11-28 09:59:08 +01:00
atlas
cf3627718e 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-28 09:59:08 +01:00