From ad4b61e5773579ea1ff71a56c1d13b6da3a92389 Mon Sep 17 00:00:00 2001 From: David Sauer Date: Wed, 27 Oct 2021 09:34:21 +0200 Subject: [PATCH] add use of cert-manager.io/v1beta and cert-manager.io/v1 versioned resources Signed-off-by: David Sauer --- charts/opa/templates/_helpers.tpl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/charts/opa/templates/_helpers.tpl b/charts/opa/templates/_helpers.tpl index 27d3b14d6..814330529 100644 --- a/charts/opa/templates/_helpers.tpl +++ b/charts/opa/templates/_helpers.tpl @@ -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 -}}