POL-0: Kyverno policy-governance model (design) — plat/mitosis#38 #49

Merged
plat merged 1 commit from docs/pol-0-policy-governance into main 2026-07-01 20:33:17 +00:00
Owner

POL-0: Kyverno policy-governance model (design only)

Governance-of-governance doc that gates the whole Kyverno track (POL-1..POL-5). Design only — no code. Adds docs/proposals/policy-governance-kyverno.md.

Framing (held): Kyverno is the deterministic backend (validate/mutate/generate/verifyImages, with generate synchronize:true reverting tampering). The agent authoring policy YAML from an NL prompt is the frontend. Kyverno is not a language-to-system compiler. Today all governance is hand-rolled TS in overlayManifests() (mcp/src/server.ts:2182), rendered once with no drift correction; adding Kyverno is a cheap Flux seam (dependsOn: cert-manager).

Decisions (each with a recommendation + tradeoff):

  1. Policy repo location — recommend a separate policy repo (stricter reviewer set), CODEOWNERS-gated gitops path as bootstrap.
  2. Agent write access — recommend propose-only via human-merged PR, never direct write; per-category yes/no (quota tier: propose; default-deny / PSA / RBAC / failurePolicy: human-only). Tied to RBAC-1.
  3. enforce vs audit — recommend audit-first for new policies (parity migrations of existing TS may ship enforce); generate drift-correction is not delayed.
  4. failurePolicy — recommend fail-closed (Fail), narrowly scoped + HA + break-glass + a kill-the-webhook test, matching authorize() (server.ts:987).

Invariants enumerated so POL-1..POL-5 become buildable: POL-1 baselines; POL-2 generate-migration of overlayManifests(); POL-3 verifyImages/cosign; POL-4 secrets+domains+network; POL-5 RBAC.

Do not merge — for review.

roadmap POL-0 (#38)

## POL-0: Kyverno policy-governance model (design only) Governance-of-governance doc that gates the whole Kyverno track (POL-1..POL-5). **Design only — no code.** Adds `docs/proposals/policy-governance-kyverno.md`. **Framing (held):** Kyverno is the deterministic **backend** (validate/mutate/generate/verifyImages, with `generate synchronize:true` reverting tampering). The agent authoring policy YAML from an NL prompt is the **frontend**. Kyverno is not a language-to-system compiler. Today all governance is hand-rolled TS in `overlayManifests()` (`mcp/src/server.ts:2182`), rendered once with no drift correction; adding Kyverno is a cheap Flux seam (`dependsOn: cert-manager`). **Decisions (each with a recommendation + tradeoff):** 1. **Policy repo location** — recommend a separate `policy` repo (stricter reviewer set), CODEOWNERS-gated `gitops` path as bootstrap. 2. **Agent write access** — recommend propose-only via human-merged PR, never direct write; per-category yes/no (quota tier: propose; default-deny / PSA / RBAC / failurePolicy: human-only). Tied to RBAC-1. 3. **enforce vs audit** — recommend audit-first for new policies (parity migrations of existing TS may ship enforce); `generate` drift-correction is not delayed. 4. **failurePolicy** — recommend fail-closed (`Fail`), narrowly scoped + HA + break-glass + a kill-the-webhook test, matching `authorize()` (`server.ts:987`). **Invariants enumerated** so POL-1..POL-5 become buildable: POL-1 baselines; POL-2 generate-migration of `overlayManifests()`; POL-3 verifyImages/cosign; POL-4 secrets+domains+network; POL-5 RBAC. Do **not** merge — for review. roadmap POL-0 (#38)
Governance-of-governance doc gating the Kyverno track (POL-1..POL-5).
Decides policy repo location, agent write access, enforce-vs-audit
default, and webhook failurePolicy; enumerates POL-1..POL-5 invariants.

roadmap POL-0 (plat/mitosis#38)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
plat merged commit bd8d0848c1 into main 2026-07-01 20:33:17 +00:00
Sign in to join this conversation.
No description provided.