Skip to content

Commit

Permalink
Update PolicyExceptions to v2beta1 (#1276)
Browse files Browse the repository at this point in the history
* Update PolicyExceptions to v2beta1

* Update changelog and add conditional failover

* Fix Nancy

* Fix templating

* Bring back conditional in case Kyverno doesn't exist yet
  • Loading branch information
fhielpos authored Jun 7, 2024
1 parent c7da7df commit 1f70e5c
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 failover to `v2beta1`.

## [6.11.0] - 2024-04-23

### Added
Expand Down
8 changes: 6 additions & 2 deletions helm/app-operator/templates/policyexception.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1f70e5c

Please sign in to comment.