Skip to content

Let the offline Kyverno engine driver model the runner-pool fence's lookups and requester groups #6215

Description

@devantler

🤖 Generated by the Agentic Engineer

Evidence and problem

The spike on #5834 (2026-11-03, Kyverno CLI and engine 1.19.2) found that kyverno test cannot exercise the cases the runner-pool retirement fence depends on once it becomes a ValidatingPolicy:

  • it cannot produce a refused or failed Namespace read (403 or 500), only "not found";
  • it gives a ValidatingPolicy a copy of the new object as the previous object, so update and delete cases lose their real "before" state;
  • the fence's administrator check reads the requester's groups.

The repository's offline engine driver (scripts/tests/tenant-webapp-admission) already runs the deployed Kyverno engine with distinct old and new objects. It does not yet accept requester groups, Namespace lookups for arc-runners, lookup failures other than "forbidden", or the runner-pool kinds (AutoscalingRunnerSet, AutoscalingListener, Pod, Secret, ExternalSecret, Namespace).

Who it affects

The platform operator. Without this, the fence cannot move off ClusterPolicy before Kyverno 1.20 removes it (#4984) without dropping about 75 cases that pin what it allows and refuses today.

Hypothesis

If the driver accepts requester groups, fictional Namespace observations served through the resource lookup, and "not found", "forbidden" and "server error" lookup failures for the kinds the fence guards, then the replacement policy in the next slice can be held to the existing cases unchanged.

Smallest useful change

Extend the driver's fixture format and lookup context only. No policy changes in this slice.

Acceptance criteria

  • A fixture can carry the requester's groups, and they reach request.userInfo.groups in the policy.
  • A fixture can supply the arc-runners Namespace for resource.Get, or ask for that read to fail as not found, forbidden or a server error, each surfacing as the policy's own fail-closed result.
  • The driver accepts the runner-pool, Pod, Secret, ExternalSecret and Namespace kinds, and still refuses an unknown kind.
  • The driver's own tests cover each new input, including a control that fails when the input is ignored; the existing tenant and GitHub-team cases pass unchanged.

Size

Small to medium: one Go test driver and its tests.

Activity

  1. added theissue type on Nov 13, 2026
  2. moved this to 🫴 Ready in 🌊 Project Boardon Nov 13, 2026
  3. self-assigned this
    on Nov 13, 2026
  4. added a commit that references this issue on Nov 13, 2026
  5. moved this from 🫴 Ready to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Nov 13, 2026
  6. devantler commented on Nov 13, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    First started: 2026-11-13 (board field set). Evidence: assigned at 2026-11-13T14:17Z and draft #6217 opened at 14:21Z.

  7. moved this from 🏃🏻‍♂️ In Progress to 🚀 Ready to Merge in 🌊 Project Boardon Nov 13, 2026
  8. moved this from 🚀 Ready to Merge to ✅ Done in 🌊 Project Boardon Nov 13, 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

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions