Skip to content

Move the ARC retirement guard to ValidatingPolicy before Kyverno 1.20 #6026

Closed as duplicate

Description

@devantler

🤖 Generated by the Agentic Engineer

Evidence

restrict-arc-retirement is one of the two policies from #4995 still deployed as a Kyverno ClusterPolicy (read from production on 10 November 2026). Kyverno 1.20 is planned to remove ClusterPolicy (#4984), so this guard must exist as a ValidatingPolicy before that upgrade, or the ARC retirement fence silently disappears.

The policy has eight rules. They stop a retired ARC runner pool, scale set, listener, listener pod, credential-sync object and credential from being recreated, and protect the retirement journal on the arc-runners Namespace. Six of the rules read that Namespace through a Kyverno API call and compare long JMESPath expressions against the journal. CLI fixtures already exist under tests/restrict-arc-retirement-*.

No retirement is in progress today: the arc-runners Namespace carries no retirement journal, so most rules are inactive in production. That lowers the risk of a gap during the move, but the guard still has to work when a retirement starts.

Problem

The earlier #4995 batches were single-rule policies. This one combines API-call contexts, CREATE/UPDATE/DELETE handling and user-group checks, so it needs its own plan and tests rather than riding along with a batch.

Acceptance criteria

  • Confirm, at the running Kyverno version, that a ValidatingPolicy can express each rule, including the Namespace lookup (for example with a CEL resource lookup), the DELETE rule on the Namespace and the system:masters check. A rule it cannot express is recorded on Migrate Kyverno ClusterPolicy and Policy before Kyverno 1.20 removes them #4984 and blocks only that rule.
  • The existing tests/restrict-arc-retirement-* fixtures pass unchanged in their expected results against the new kind, with at least one negative control per rule.
  • The failure action stays Enforce, with the same match scope and failurePolicy: Fail, as recorded in tests/policy-failure-actions.json.
  • The replacement is added and the ClusterPolicy is deleted in the same change. After deploy, the new policy reports ready and no ClusterPolicy of this name remains.

Size

Medium. Part of #4995.

Activity

  1. added theissue type on Nov 10, 2026
  2. moved this to 📥 Backlog in 🌊 Project Boardon Nov 10, 2026
  3. coderabbitai commented on Nov 10, 2026

    @coderabbitai
    Contributor
    ⚠️ Possible Duplicate Issue(s)


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. devantler commented on Nov 10, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Duplicate of #5834, which already tracks moving restrict-arc-retirement to ValidatingPolicy under #4995. The production read and the extra acceptance points from this issue are copied there.

  5. moved this from 📥 Backlog to ✅ Done in 🌊 Project Boardon Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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