From f2307f7db159b00bd312d28a1a7f518d2dc7bd8b Mon Sep 17 00:00:00 2001 From: "Gupta, Sangeet (sg774j)" Date: Thu, 11 Feb 2021 17:16:20 +0000 Subject: [PATCH] [ca-issuer]: Support different versions of cert-manager v1.0.0 onwards of jetstack/cert-manager the apiVersion of CRD Issuer was changed to v1. This patchset add support for earlier version of cert-manager. Change-Id: I884c4e8e8c07e30240cd9fb3c125bd2aee6c4ddf --- ca-issuer/Chart.yaml | 2 +- ca-issuer/templates/issuer-ca.yaml | 4 ++++ releasenotes/notes/ca-issuer.yaml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ca-issuer/Chart.yaml b/ca-issuer/Chart.yaml index ffca090ff..5a67c883b 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.1.3 +version: 0.2.0 ... diff --git a/ca-issuer/templates/issuer-ca.yaml b/ca-issuer/templates/issuer-ca.yaml index 01af5f337..ef9e720db 100644 --- a/ca-issuer/templates/issuer-ca.yaml +++ b/ca-issuer/templates/issuer-ca.yaml @@ -15,7 +15,11 @@ limitations under the License. {{- if .Values.manifests.issuer }} {{- $envAll := . }} --- +{{- if semverCompare "< 0.2.0" .Chart.Version }} apiVersion: cert-manager.io/v1alpha3 +{{- else }} +apiVersion: cert-manager.io/v1 +{{- end }} kind: Issuer metadata: name: {{ .Values.conf.ca.issuer.name }} diff --git a/releasenotes/notes/ca-issuer.yaml b/releasenotes/notes/ca-issuer.yaml index e3bcb84ec..9a93b7a05 100644 --- a/releasenotes/notes/ca-issuer.yaml +++ b/releasenotes/notes/ca-issuer.yaml @@ -1,4 +1,8 @@ --- ca-issuer: - 0.1.0 Initial Chart + - 0.1.1 Change helm-toolkit dependency version to ">= 0.1.0" + - 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 ...