From 428361f8c50a9b30f8de7fd86504c60a16a3c299 Mon Sep 17 00:00:00 2001 From: Keith Jackson Date: Sun, 16 Aug 2026 00:11:22 -0500 Subject: [PATCH] fix(platform): make kyverno bundle build; defer render to Phase 2 (T-2.7) The prior integration commit enabled kyverno in the platform render, but (a) the admission bundle used ../policies refs that fail default kustomize load restrictions, and (b) admission enforcement is Phase 2 (T-2.7), not Phase 0. Fix: platform/kyverno/kustomization.yaml now lists resources with downward paths (builds standalone); platform/kustomization.yaml re-defers kyverno with a Phase-2 note. All Phase-0 gates green: kustomize (platform, platform/kyverno, dev), schema validation, conformance scaffold. Co-Authored-By: Claude Opus 4.8 (1M context) --- platform/kustomization.yaml | 5 ++++- platform/kyverno/kustomization.yaml | 26 ++++++++++++++++++++------ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/platform/kustomization.yaml b/platform/kustomization.yaml index 98f794c..a666b64 100644 --- a/platform/kustomization.yaml +++ b/platform/kustomization.yaml @@ -11,7 +11,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - kyverno # PM: enabled — admission enforcer first so policies precede other components + # - kyverno # DEFERRED to Phase 2 (T-2.7): admission enforcement needs a cluster. + # Scaffolding is present & buildable at platform/kyverno/; enable it first + # (before other components) when T-2.7 activates. Kyverno's CI L0 gate is + # already live now via .gitea/ + ci/ (no cluster needed). - cilium - longhorn - cert-manager diff --git a/platform/kyverno/kustomization.yaml b/platform/kyverno/kustomization.yaml index 232de99..c974755 100644 --- a/platform/kyverno/kustomization.yaml +++ b/platform/kyverno/kustomization.yaml @@ -1,10 +1,24 @@ -# PM integration glue (Phase 0): makes platform/kyverno a Flux platform component. -# Renders the in-cluster ENFORCING bundle authored by WS-TEST (admission/) — Kyverno install -# + the policies shared verbatim with the CI L0 gate (ADR-0011, docs/07 admission enforcement). +# platform/kyverno — in-cluster ENFORCING bundle (Kyverno install + policies shared verbatim with +# the CI L0 gate; ADR-0011, docs/07 admission enforcement). # -# The CI-only artifacts (tests/, servicedefinition/ payloads, scripts/run-l0.sh) are intentionally -# NOT rendered into the cluster — they run in CI (.gitea/ + ci/), not in-cluster. +# Resources are listed with DOWNWARD paths only (no `../`) so this builds under default kustomize +# load restrictions. The admission/kustomization.yaml authored by WS-TEST uses `../policies` refs and +# is kept as reference; THIS file is the buildable render root. +# +# NOTE: not yet wired into platform/kustomization.yaml — admission enforcement is Phase 2 (T-2.7), +# which needs a cluster. Scaffolding is present and buildable now. +# +# CI-only artifacts (tests/, servicedefinition/ payloads, scripts/run-l0.sh) are intentionally NOT +# rendered into the cluster — they run in CI (.gitea/ + ci/). apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: kyverno resources: - - admission + - admission/namespace.yaml + - admission/helmrelease.yaml + - policies/require-default-deny-baseline.yaml + - policies/validate-default-deny-shape.yaml + - policies/restrict-host-namespaces.yaml + - policies/require-egress-class-label.yaml + - policies/require-auth-mode-label.yaml + - admission/secret-provenance.yaml