Skip to content

Commit

Permalink
add use of cert-manager.io/v1beta and cert-manager.io/v1 versioned re…
Browse files Browse the repository at this point in the history
…sources

Signed-off-by: David Sauer <[email protected]>
  • Loading branch information
damoon authored and eshepelyuk committed Oct 27, 2021
1 parent b7945a6 commit ad4b61e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions charts/opa/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ Detect the version of cert manager crd that is installed
Error if CRD is not available
*/}}
{{- define "opa.certManagerApiVersion" -}}
{{- if (.Capabilities.APIVersions.Has "cert-manager.io/v1alpha3") -}}
cert-manager.io/v1alpha3
{{- else if (.Capabilities.APIVersions.Has "cert-manager.io/v1alpha2") -}}
cert-manager.io/v1alpha2
{{- else if (.Capabilities.APIVersions.Has "certmanager.k8s.io/v1alpha1") -}}
certmanager.k8s.io/v1alpha1
{{- if (.Capabilities.APIVersions.Has "cert-manager.io/v1") -}}
cert-manager.io/v1
{{- else if (.Capabilities.APIVersions.Has "cert-manager.io/v1beta1") -}}
cert-manager.io/v1beta1
{{- else -}}
{{- fail "cert-manager CRD does not appear to be installed" }}
{{- end -}}
Expand Down

0 comments on commit ad4b61e

Please sign in to comment.