feat: embed k3s to run soul-demo as self-healing k8s pods #13

Merged
will.anderson merged 2 commits from feat/k3s-embedded-soul into dev 2026-05-09 17:40:46 +00:00

2 Commits

Author SHA1 Message Date
will.anderson c6ee45a374 fix: run k3s as root, bump HPA CPU threshold to 80%
Dev — Build & local smoke test / build-smoke (pull_request) Failing after 3m54s
k3s needs CAP_SYS_ADMIN to create network namespaces and mount cgroups.
USER landing was preventing this. Cloud Run gen2 is the security boundary.

60% CPU was too conservative for soul-demo — it is I/O-bound (LLM API calls),
not CPU-bound. 80% gives correct headroom before scaling kicks in.
2026-05-09 12:40:27 -05:00
will.anderson ddbb568f1d feat: embed k3s in neuron-web image to run soul-demo as managed pods
soul-demo now runs as a k3s Deployment with HPA (1–8 replicas, 60% CPU
target) instead of a bare background process. k3s starts first in
entrypoint.sh, imports the soul-demo:local OCI tar from
/var/lib/rancher/k3s/agent/images, and auto-applies the Deployment,
NodePort Service, and HPA from the server/manifests dir. neuron-web
starts only after the soul-demo pod is Running. Cloud Run gen2 execution
environment required for k3s (provides /dev/kmsg and Linux capabilities).
2026-05-09 12:40:27 -05:00