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:
parent
77041b35ac
commit
aec63c4d56
18 changed files with 104 additions and 98 deletions
35
apps/base/forgejo/ci-runners-namespace.yaml
Normal file
35
apps/base/forgejo/ci-runners-namespace.yaml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ci-runners
|
||||
# The Forgejo Actions CI capsule: three runner Deployments (each with a
|
||||
# privileged docker-in-docker sidecar), their data PVCs, and the nightly
|
||||
# prune CronJob (hostPath `/var/run/docker.sock`).
|
||||
#
|
||||
# `enforce: privileged` is deliberate and is the whole point of this
|
||||
# namespace existing. Pod Security has no per-workload exception: if these
|
||||
# pods share `forgejo`, that namespace can only ever be warn/audit, i.e. no
|
||||
# namespace in the cluster enforces anything. Isolating the capsule here lets
|
||||
# `forgejo` enforce `baseline` (Forgejo, Postgres, backups) while this
|
||||
# namespace keeps the one shape that genuinely needs node root and is
|
||||
# labelled as such in Git.
|
||||
#
|
||||
# This is containment, not a grant of new privilege: the dind sidecar was
|
||||
# already privileged, and CI job containers are unprivileged
|
||||
# (`container.privileged: false` in the runner ConfigMap). Keep this
|
||||
# namespace free of anything that is not part of the CI capsule, and give it
|
||||
# its own NetworkPolicy/RBAC scope rather than widening it.
|
||||
#
|
||||
# warn/audit are `privileged` too, on purpose: at that level PSA prints and
|
||||
# records nothing, which is the honest signal — everything here is allowed by
|
||||
# design, and the namespace holds only the CI capsule. (Warn/audit at
|
||||
# `restricted` would emit the same five violations for every pod, every
|
||||
# restart, and train everyone to ignore them.) Anything added here that is not
|
||||
# part of the capsule is a review failure in Git, not an admission event.
|
||||
labels:
|
||||
pod-security.kubernetes.io/enforce: privileged
|
||||
pod-security.kubernetes.io/enforce-version: latest
|
||||
pod-security.kubernetes.io/warn: privileged
|
||||
pod-security.kubernetes.io/warn-version: latest
|
||||
pod-security.kubernetes.io/audit: privileged
|
||||
pod-security.kubernetes.io/audit-version: latest
|
||||
Loading…
Reference in a new issue