Skip to content

fix(kyverno): vendored Kyverno 1.17.2 requires MutatingAdmissionPolicy API absent on OpenShift 4.19/4.20 #166

Open

Description

@butler54

Summary

The vendored Kyverno chart (charts/vendor/kyverno, chart 3.7.2, appVersion v1.17.2) cannot run on OpenShift 4.19 (Kubernetes 1.32) or 4.20 (Kubernetes 1.33).

Its admission controller unconditionally watches the admissionregistration.k8s.io/v1alpha1 MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding APIs. Those APIs are not served on OpenShift 4.19/4.20, so the controller enters CrashLoopBackOff:

failed to list *v1alpha1.MutatingAdmissionPolicy: the server could not find the requested resource
failed to list *v1alpha1.MutatingAdmissionPolicyBinding: the server could not find the requested resource
failed to wait for cache sync

Impact

kyverno is a sync-wave 0 application. Because it reports Degraded, the app-of-apps health gate never releases waves 10/15/20/30 — so the pattern cannot converge at all on 4.19 or 4.20. This effectively sets the pattern's support floor at 4.21 for any deployment that uses sync-wave gating.

Reproduction

  1. Install OpenShift 4.19.x or 4.20.x (any topology; observed on SNO).
  2. Confirm the API is absent:
    oc api-resources | grep -i mutatingadmissionpolic   # no output
  3. Deploy the pattern (with gitops.applicationHealthCheckEnabled: "true" so waves are gated).
  4. Observe:
    oc get pods -n kyverno            # admission-controller CrashLoopBackOff
    oc logs -n kyverno deploy/kyverno-admission-controller   # errors above
    oc get applications.argoproj.io -n vp-gitops             # kyverno Degraded; only wave 0 exists

Environment

Component Version
OpenShift 4.19 4.19.53 — Kubernetes v1.32.x
OpenShift 4.20 4.20.45 — Kubernetes v1.33.13
Kyverno chart 3.7.2 (vendored)
Kyverno appVersion v1.17.2 (compiled against k8s.io/client-go v0.35.1)
Pattern PR #165 head (sync-wave gating enabled)

There is no configuration workaround

  • features.generateMutatingAdmissionPolicy.enabled: false (already the default)
  • features.mutatingAdmissionPolicyReports.enabled: false (already the default)

The informer is still registered, so disabling the feature flags does not help.

The vendored chart declares kubeVersion: '>=1.25.0-0', which claims support for these clusters — so this is a Kyverno defect relative to its own declared support, not an OpenShift-version limitation.

Proposed resolution (any one)

  1. Per-version Kyverno pin — select an older Kyverno (one that does not watch MutatingAdmissionPolicy) for OpenShift versions whose Kubernetes does not serve the alpha API, keyed off global.clusterVersion; add the pinned image to the airgap imageset.
  2. Upstream Kyverno fix — gate the MutatingAdmissionPolicy/MutatingAdmissionPolicyBinding informers on API discovery (ServerResourcesForGroupVersion), which would make 4.19/4.20 work with no pin.
  3. Document the floor — record that 4.21 is the minimum supported version until either of the above lands (done in docs/supported-openshift-versions.md, being added alongside this issue).

Evidence

  • OCP 4.19.53: kyverno-admission-controller in CrashLoopBackOff, wave-0 app Degraded, pattern stalled at wave 0.
  • OCP 4.20.45: cluster installs cleanly (34/34 cluster operators Available) but oc api-resources | grep -i mutatingadmissionpolic returns nothing — the same precondition.
  • OCP 4.22 (Kubernetes 1.35): Kyverno runs and is Healthy; the pattern validates end-to-end (PR fix(airgap): mode-agnostic disconnected fixes and sync-wave gating #165).

Related

Activity

  1. butler54 commented on Nov 5, 2026

    @butler54
    CollaboratorAuthor

    Update: OCP 4.21 is affected too — the API is absent there as well (measured)

    Adding a measured data point that widens the impact of this issue beyond 4.19/4.20.

    On a clean OpenShift 4.21.41 install (Kubernetes v1.34.9), after the
    cluster reached Cluster version is 4.21.41 / Available=True with all cluster
    operators healthy:

    $ oc api-versions | grep admissionregistration
    admissionregistration.k8s.io/v1
    
    $ oc api-resources | grep -i mutatingadmissionpolic
    (no output)

    The admissionregistration.k8s.io group serves only v1 — no v1alpha1,
    no v1beta1, and no MutatingAdmissionPolicy resource in any version. By
    contrast, OpenShift 4.22 (Kubernetes 1.35) does serve it, which is why the
    pattern validates there (PR #165).

    Revised impact table

    OpenShift Kubernetes MutatingAdmissionPolicy Vendored Kyverno 1.17.2
    4.19 1.32 absent CrashLoopBackOff (observed)
    4.20 1.33 absent (verified) same failure
    4.21 1.34 absent (verified) same failure
    4.22 1.35 present runs (validated end-to-end)

    Consequence

    The support floor for any deployment using sync-wave gating is effectively
    4.22, not 4.21. A single per-version Kyverno pin would therefore restore
    three minor versions (4.19, 4.20, 4.21) rather than one, which materially raises
    the value of option 1 in the proposed resolution.

    Note for whoever picks this up: the fix must be verified against a cluster whose
    oc api-resources genuinely lacks the resource — the presence of the API cannot
    be assumed from the Kubernetes minor alone.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions