ci(runners): name the CI capsule ci-runners and mark it privileged in warn/audit too

Renames the namespace introduced in #72 (`forgejo-runners` -> `ci-runners`) per
the orchestrator decision on card t_2bbe34a8, and sets the capsule's
warn/audit levels to `privileged` alongside `enforce: privileged`: everything
in it is allowed by design, so restricted-level warnings on every pod restart
would be noise, and the intent is explicit in Git rather than implied.

Storage is the same three PVs, rebound again by name (Retain + cleared
claimRef), so the runner registration uuids, dind image sets and action caches
survive: verified before/after (uuids 91124ee3/4e07c1e9/a41aad73, image counts
19/2/31, canary files intact). Monitoring selectors and docs follow the new
namespace; the Grafana dashboard keeps its `forgejo-runners` uid.
This commit is contained in:
Lancelot 2026-11-27 01:20:56 -05:00
commit aec63c4d56
18 changed files with 104 additions and 98 deletions

View file

@ -3,14 +3,15 @@
Status of Pod Security Admission (PSA) labels per namespace, why one workload
still needs `privileged`, and what is enforced where. Two namespaces now
*enforce*, not just warn: `forgejo` at `baseline` and the CI capsule
`forgejo-runners` at `privileged`.
`ci-runners` at `privileged`.
## Levels in use
| level | namespaces |
|---|---|
| `enforce: baseline` + `warn`/`audit: restricted` | `cert-manager`, `customer1`, `forgejo`, `metabase`, `osint`, `piedmont`, `secops`, `sirius-growth`, `siriusdevops` |
| `enforce: privileged` + `warn`/`audit: restricted` | `forgejo-runners` (the Actions CI capsule), `logging` |
| `enforce: privileged` + `warn`/`audit: privileged` | `ci-runners` (the Actions CI capsule) |
| `enforce: privileged` + `warn`/`audit: restricted` | `logging` |
| `warn`/`audit: restricted` only | `netsec`, `monitoring`, `node-io`, `internal`, `gateway-system`, `local-path-storage`, plus cluster-owned `kube-system`, `kube-public`, `kube-node-lease`, `default`, `cnpg-system`, `cilium-secrets`, `flux-system` |
The enforced set was picked by reading the live workload templates first: every
@ -49,7 +50,7 @@ for ns in kube-system kube-public kube-node-lease default cnpg-system cilium-sec
done
```
## The Forgejo CI capsule (`forgejo-runners`)
## The Forgejo CI capsule (`ci-runners`)
The three Actions runners (`forgejo-runner-amd64`, `forgejo-runner-arm64`,
`forgejo-runner-deploy-arm64`) each carry a docker-in-docker sidecar with
@ -71,10 +72,11 @@ split buys:
accepted;
* the only namespace allowed to run a privileged pod is the one whose name says
so, labelled as such in Git, and it holds nothing but the CI capsule;
* the capsule keeps `warn`/`audit: restricted`, so every privileged/hostPath
pod there is still printed and recorded as an audit annotation.
* the capsule's `warn`/`audit` are `privileged` as well (the operator's decision):
they emit nothing because everything there is allowed by design, and the
namespace is reviewed in Git rather than at admission.
What is inside `forgejo-runners`: the three runner Deployments, their PVCs
What is inside `ci-runners`: the three runner Deployments, their PVCs
(`forgejo-runner-amd64` on siriussec's local-path, `forgejo-runner-arm64-dind`
200 Gi and `forgejo-runner-deploy-arm64-dind` 40 Gi as static Retain PVs on
rpi), the `forgejo-runner-config` ConfigMap, the two registration-token
@ -134,12 +136,12 @@ Three independent attempts to drop the flag were measured live on 2026-11-27
kubectl -n forgejo get pods -o jsonpath='{..securityContext.privileged}'
# forgejo enforces baseline; the capsule is explicitly privileged + audited
kubectl get ns forgejo forgejo-runners -o jsonpath='{range .items[*]}{.metadata.name}{" "}{.metadata.labels}{"\n"}{end}'
kubectl get ns forgejo ci-runners -o jsonpath='{range .items[*]}{.metadata.name}{" "}{.metadata.labels}{"\n"}{end}'
# admission really rejects the shape in forgejo (expect Forbidden)
kubectl -n forgejo run probe-bad --image=busybox --restart=Never \
--overrides='{"spec":{"containers":[{"name":"p","image":"busybox","securityContext":{"privileged":true}}]}}'
# the prune CronJob (and its RBAC) now live in the capsule
kubectl -n forgejo-runners get cronjob,role,rolebinding,sa -l app=forgejo-runner
kubectl -n ci-runners get cronjob,role,rolebinding,sa -l app=forgejo-runner
```