Skip to content

Commit

Permalink
Update PolicyExceptions to v2 and fallback to v2beta1 (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhielpos authored Jun 7, 2024
1 parent 2123cbf commit 8ee63fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s

## [Unreleased]

### Changed

- Update PolicyExceptions to v2 and fallback to v2beta1.

## [3.2.1] - 2024-03-05

### Fixed
Expand Down
8 changes: 6 additions & 2 deletions helm/chart-operator/templates/policy-exceptions.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{{- if .Values.kyvernoPolicyExceptions.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: {{ tpl .Values.resource.default.name . }}-policy-exceptions
Expand Down

0 comments on commit 8ee63fd

Please sign in to comment.