From 97bd2c4937945e38d9d985d9b2e4dcb21d2043ee Mon Sep 17 00:00:00 2001 From: "Haider, Nafiz (nh532m)" Date: Fri, 19 Feb 2021 12:07:00 -0600 Subject: [PATCH] [ca-issuer]: Support different versions of cert-manager Support cert manager version v1.2.0 by default and logic to support earlier versions. Change-Id: I70a45eb3cccc7cfbe2784048a4524bd9e4d832df --- ca-issuer/Chart.yaml | 2 +- ca-issuer/templates/issuer-ca.yaml | 2 +- ca-issuer/values.yaml | 5 +++++ releasenotes/notes/ca-issuer.yaml | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ca-issuer/Chart.yaml b/ca-issuer/Chart.yaml index 5a67c883b..3540ef4db 100644 --- a/ca-issuer/Chart.yaml +++ b/ca-issuer/Chart.yaml @@ -16,5 +16,5 @@ appVersion: "1.0" description: Certificate Issuer chart for OSH home: https://cert-manager.io/ name: ca-issuer -version: 0.2.0 +version: 0.2.1 ... diff --git a/ca-issuer/templates/issuer-ca.yaml b/ca-issuer/templates/issuer-ca.yaml index ef9e720db..ee24c6191 100644 --- a/ca-issuer/templates/issuer-ca.yaml +++ b/ca-issuer/templates/issuer-ca.yaml @@ -15,7 +15,7 @@ limitations under the License. {{- if .Values.manifests.issuer }} {{- $envAll := . }} --- -{{- if semverCompare "< 0.2.0" .Chart.Version }} +{{- if semverCompare "< v1.0.0" .Values.cert_manager_version }} apiVersion: cert-manager.io/v1alpha3 {{- else }} apiVersion: cert-manager.io/v1 diff --git a/ca-issuer/values.yaml b/ca-issuer/values.yaml index 614bd466c..a9a717126 100644 --- a/ca-issuer/values.yaml +++ b/ca-issuer/values.yaml @@ -19,6 +19,11 @@ conf: crt: null key: null +# Default Version of jetstack/cert-manager being deployed. +# Starting at v1.0.0, api-version: cert-manager.io/v1 is used +# For previous apiVersion: cert-manager.io/v1alpha3, change to older version (such as v0.15.0) +cert_manager_version: v1.0.0 + manifests: issuer: true secret_ca: true diff --git a/releasenotes/notes/ca-issuer.yaml b/releasenotes/notes/ca-issuer.yaml index 9a93b7a05..d3db77413 100644 --- a/releasenotes/notes/ca-issuer.yaml +++ b/releasenotes/notes/ca-issuer.yaml @@ -5,4 +5,5 @@ ca-issuer: - 0.1.2 Update apiVersion of Issuer to v1 - 0.1.3 Revert - Update apiVersion of Issuer to v1 - 0.2.0 Only Cert-manager version v1.0.0 or greater will be supported + - 0.2.1 Cert-manager "< v1.0.0" supports cert-manager.io/v1alpha3 else use api cert-manager.io/v1 ...