Merge pull request #83 from wt/t_8aa4af50-kata-docs into master
This commit is contained in:
commit
a8b890c55a
1 changed files with 40 additions and 0 deletions
|
|
@ -180,6 +180,42 @@ Rollback is one field: drop `runtimeClassName: kata-qemu` from that Deployment
|
|||
`kata-ext4.img` is an unused file until then (it is a cache; deleting it is
|
||||
safe). The containerd drop-in on rpi is inert once no pod asks for the handler.
|
||||
|
||||
### Measured cost of the microVM (warm cache, same content)
|
||||
|
||||
| workflow | runner / runtime | run | wall clock |
|
||||
|---|---|---|---|
|
||||
| `deploy-site` (sirius-growth) | `deploy-arm64`, runc | 130 | 22 s |
|
||||
| `deploy-site` (sirius-growth) | `deploy-arm64`, runc | 129 | 31 s |
|
||||
| `deploy-site` (sirius-growth) | `deploy-arm64`, **Kata** | 133 | **48 s** |
|
||||
| `deploy` (siriusdevops) | `docker-amd64`, runc (untouched) | 67 | 49 s (66: 49 s) |
|
||||
|
||||
So the VM costs roughly **+25 s per deploy** on a warm image cache (boot + guest
|
||||
plumbing), and pushes the amd64 site image with its own digest
|
||||
(`sirius-growth-site:7e1dd4cc…`, manifest `sha256:7b2987b4…`). The untouched
|
||||
amd64 runner is unchanged to the second, and `runs-on: docker` was not touched.
|
||||
|
||||
Three things had to be fixed before the first real job would run — all measured,
|
||||
all in the manifests now:
|
||||
|
||||
1. **The dind socket must not live on virtiofs.** A disk-backed `emptyDir` is a
|
||||
virtiofs share; a unix socket created there is *visible* but unconnectable
|
||||
from the other containers (`runner: cannot ping the docker daemon …` while
|
||||
`dind: docker version` on the same path succeeds). The socket directory is
|
||||
`medium: Memory` (tmpfs in the guest) instead.
|
||||
2. **No per-job `--memory` inside the VM.** The guest cgroup root is
|
||||
`domain threaded` with only `cpuset cpu pids` delegated, so dockerd cannot
|
||||
apply a memory limit and every job dies at `docker run` with
|
||||
`cannot enter cgroupv2 "/sys/fs/cgroup/docker" with domain controllers`.
|
||||
The 2Gi dind limit sizes the VM, so that is the bound now.
|
||||
3. **binfmt is per-VM.** The host's qemu handlers are not visible inside the
|
||||
guest, so `--platform linux/amd64` needs `tonistiigi/binfmt --install amd64`
|
||||
on every pod start (the image itself is cached in the ext4 data-root).
|
||||
|
||||
Operational note: the Deployment is `strategy: Recreate`, so a rollout during a
|
||||
run kills the job *and* leaves the Forgejo run `running` forever (reproduced,
|
||||
run 132 — there is no cancel endpoint). Land template changes while the runner
|
||||
is idle.
|
||||
|
||||
## Why the dind sidecar keeps `privileged` (measured, do not re-derive)
|
||||
|
||||
Three independent attempts to drop the flag were measured live on 2026-11-27
|
||||
|
|
@ -219,4 +255,8 @@ kubectl -n forgejo run probe-bad --image=busybox --restart=Never \
|
|||
|
||||
# the prune CronJob (and its RBAC) now live in the capsule
|
||||
kubectl -n ci-runners get cronjob,role,rolebinding,sa -l app=forgejo-runner
|
||||
|
||||
# only the deploy runner is a microVM; the other two are runc/privileged dind
|
||||
kubectl -n ci-runners get pods -l app=forgejo-runner \
|
||||
-o custom-columns=NAME:.metadata.name,RUNTIME:.spec.runtimeClassName,NODE:.spec.nodeName
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue