Phase 19: Policy-as-Code (Kyverno)
Phase 19: Policy-as-Code (Kyverno)
Goal: Deploy Kyverno for Kubernetes admission control — enforce image registry allowlists, resource governance, and baseline security policies across all namespaces.
Owner: Dev agent
Repo:
forgejo_admin/pal-e-platformDepends on: Phase 8 (Network Security — Kyverno is the admission control layer above NetworkPolicies)
Tier: 2 — Hardening. Admission policies prevent bad changes from reaching the cluster. Kyverno over OPA/Gatekeeper because policies are native Kubernetes YAML — no Rego language to learn, AI agents can write and review them natively.
DORA: CFR — admission policies catch misconfigurations before they become incidents. Every rejected bad manifest is a change failure that never happened.
Scope
- Deploy Kyverno via Helm in
kyvernonamespace - ClusterPolicies (baseline):
- Namespace exceptions: System namespaces (
kube-system,cnpg-system) get audit-only mode, not enforce - Kyverno Prometheus metrics → Grafana policy violation dashboard
- Alertmanager integration: alert on policy violations in enforce mode
- SOP:
sop-policy-as-code— how to add/update policies, exception process
Deliverables
- TBD — filled after completion
Related
plan-pal-e-platform— parent planphase-pal-e-platform-network-security— Phase 8, Kyverno is the layer abovephase-platform-20c-supply-chain-signing— Kyverno enforces "only signed images deploy"sop-network-security— existing security SOP, Kyverno extends it