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.
30 lines
1.6 KiB
YAML
30 lines
1.6 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: forgejo
|
|
# Pod Security: `enforce: baseline` here. Everything that lives in this
|
|
# namespace — Forgejo itself, the CNPG Postgres cluster, the nightly
|
|
# cluster-backup CronJob — is baseline-clean (no privileged, no hostPath,
|
|
# no host namespaces, no added capabilities), so the enforcement is real
|
|
# rather than decorative.
|
|
#
|
|
# The Actions runners are NOT here any more. A docker-in-docker sidecar
|
|
# cannot lose `privileged: true` on these nodes (procfs needs CAP_SYS_ADMIN,
|
|
# kubelet mounts /sys/fs/cgroup read-only for non-privileged pods, rootless
|
|
# dind is blocked by the masked /proc and the absent /dev/net/tun — all
|
|
# measured, see docs/pod-security.md), so the three runner Deployments, their
|
|
# PVCs and the prune CronJob live in `ci-runners`, which enforces PSA at
|
|
# `privileged` on purpose. Moving them out is what lets this namespace
|
|
# enforce baseline: if a runner (or anything else privileged/hostPath) is
|
|
# ever added here, admission rejects it instead of silently accepting it.
|
|
#
|
|
# warn/audit stay at `restricted`: a future pod that is baseline-clean but
|
|
# not restricted-clean (e.g. missing seccomp/runAsNonRoot) is still printed
|
|
# and recorded as audit annotations.
|
|
labels:
|
|
pod-security.kubernetes.io/enforce: baseline
|
|
pod-security.kubernetes.io/enforce-version: latest
|
|
pod-security.kubernetes.io/warn: restricted
|
|
pod-security.kubernetes.io/warn-version: latest
|
|
pod-security.kubernetes.io/audit: restricted
|
|
pod-security.kubernetes.io/audit-version: latest
|