diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ef8b1e7d..b26c336f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s ## [Unreleased] +### Changed + +- Update `PolicyExceptions` to `v2` and failover to `v2beta1`. + ## [6.11.0] - 2024-04-23 ### Added diff --git a/helm/app-operator/templates/policyexception.yaml b/helm/app-operator/templates/policyexception.yaml index 9c3019de9..bbaad69a6 100644 --- a/helm/app-operator/templates/policyexception.yaml +++ b/helm/app-operator/templates/policyexception.yaml @@ -1,7 +1,11 @@ {{- if .Values.kyvernoPolicyExceptions.enabled }} {{- if .Values.bootstrapMode.enabled }} -{{- if .Capabilities.APIVersions.Has "kyverno.io/v2alpha1/PolicyException" -}} -apiVersion: kyverno.io/v2alpha1 +{{- if .Capabilities.APIVersions.Has "kyverno.io/v2beta1/PolicyException" }} + {{- if .Capabilities.APIVersions.Has "kyverno.io/v2/PolicyException" }} +apiVersion: kyverno.io/v2 + {{- else }} +apiVersion: kyverno.io/v2beta1 + {{- end }} kind: PolicyException metadata: name: {{ include "resource.default.name" . }}-bootstrap-mode