Skip to content

Preserve the public listener guard while migrating its validation API #5464

Open

Description

@devantler

🤖 Generated by the Agentic Engineer

Objective

Preserve the public-only listener configuration boundary while moving its retiring ClusterPolicy API to ValidatingPolicy. This is a bounded slice of #4995, with independent deployment and acceptance.

Existing evidence

The four current listener fixture families contain six literal outcomes: the approved public configuration passes, the same reserved name in another namespace fails, an unrelated name is excluded, and changed listener content, extra data and binary data are denied. All six outcomes pass on both Kyverno 1.19.1 and the repository's current 1.19.2 CLI. The existing rule enforces admission and retains background reporting.

Acceptance criteria

  • Retain those six original resource/outcome cases and old-policy baseline receipts. Characterize CREATE, UPDATE, DELETE and absent/null/empty inputs before rewriting; retain the existing decision where an operation is matched. Negative controls must prove each independent protection is evaluated.
  • Preserve the reserved resource/name scope, namespace boundary, exact allowed public content, data/binary-data restrictions, failure action and background reporting. A format migration must not introduce new listener behavior or permissions.
  • Deploy the replacement alongside the unchanged legacy policy. Verify the replacement's webhook, reporting permissions and readiness against the actual published source before proposing legacy removal in a separate protected change.
  • Keep the fixtures bound to the replacement alone, preserve effective failure-action validation, and pass applicable regressions, the fixture-evaluation guard, naming checks, manifest-layer builds and static schema validation. Obtain current-head substantive review and normal protected delivery.
  • Complete the removal only after the first deployment is accepted, then read back the replacement Ready and the old ClusterPolicy absent at the delivered revision. Keep this issue open until that final runtime acceptance.

Scope and planning

Part of #4995. Priority High; Effort Low; Service class Risk reduction. Existing configuration and credential handling stay within their current boundaries; the work changes the validation API, not the listener configuration. No additional service, subscription or local cluster is needed.

Activity

  1. self-assigned this
    on Oct 27, 2026
  2. added theissue type on Oct 27, 2026
  3. updated Effort Low, Priority High and Start date 2026-10-27 on Oct 27, 2026
  4. moved this to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Oct 27, 2026
  5. added 2 commits that reference this issue on Oct 27, 2026
  6. moved this from 🏃🏻‍♂️ In Progress to 👀 In Review in 🌊 Project Boardon Oct 27, 2026
  7. devantler commented on Oct 28, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    The replacement was staged by #5468 and its native deployment reports Ready, but further scope characterization found a gap that blocks legacy removal. The pinned Kyverno engine interprets the old kind-only selector across API groups; the staged replacement selects only the core API group. A deliberately narrowed selector still passes the CLI fixture, so that fixture cannot prove resource-rule parity.

    I am retaining the legacy policy. The removal candidate remains unpublished. Complete literal-kind admission parity, prove that a narrower selector is rejected by an independent control, and obtain background-reporting readiness before proposing removal. The reporting prerequisite is #4929; no extra permissions or reporting suppression are introduced to satisfy this migration. The existing acceptance criteria remain unchanged.

  8. moved this from 👀 In Review to 🫴 Ready in 🌊 Project Boardon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

High

Start date

Oct 27, 2026

Effort

Low

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions