You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move the runner-pool retirement fence and its tooling to ValidatingPolicy #6216
restrict-arc-retirement is the last of #4995's twelve validation policies that has not started its move to ValidatingPolicy before Kyverno 1.20 removes ClusterPolicy (#4984). The spike on #5834 found that the move also has to change the retirement tooling: scripts/retire-arc-pool.sh reads the live clusterpolicy restrict-arc-retirement and compares it rule by rule, and both it and scripts/retire-arc-pool/writer.go recognise a fence denial by the ClusterPolicy webhook name and its restrict-arc-retirement: / <rule>: message lines. A ValidatingPolicy denial instead reads Policy restrict-arc-retirement failed: <message> from the vpol.validate.kyverno.svc webhook family, with no rule name.
Who it affects
The platform operator: if the policy moves without the tooling, a real runner-pool retirement would be refused by its own tooling; if it moves without its cases, a Flux change could quietly re-create the retired pool or its credentials.
Hypothesis
If the replacement ValidatingPolicy is held to the existing cases unchanged (through the driver from #6215), every validation's message names the old rule it replaces, and the tooling reads the new kind and denial format, the ClusterPolicy can be deleted in the same change with no change in what is allowed or refused.
Acceptance criteria
Each of the eight rules has an equivalent validation with the same failure action and the same fail-closed behaviour when the Namespace cannot be read; each message names its old rule.
The existing ~75 engine cases and the tests/restrict-arc-retirement-* fixtures pass against the replacement with unchanged expected results.
scripts/retire-arc-pool.sh, scripts/retire-arc-pool/writer.go and their contract test read the ValidatingPolicy and its denial format.
tests/policy-failure-actions.json and the fixture-evaluation self-test are updated; the ClusterPolicy is deleted in the same PR.
Activity