From 2b14b3234d3b853c7805b237066aef5c81927fa3 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:54:25 +0100 Subject: [PATCH] fix the Helm trick that we use to differentiate between 0 and an empty value Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- .../charts/cert-manager/templates/cainjector-deployment.yaml | 4 ++-- deploy/charts/cert-manager/templates/deployment.yaml | 4 ++-- deploy/charts/cert-manager/templates/webhook-deployment.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deploy/charts/cert-manager/templates/cainjector-deployment.yaml b/deploy/charts/cert-manager/templates/cainjector-deployment.yaml index fe09c279c..25bf475ce 100644 --- a/deploy/charts/cert-manager/templates/cainjector-deployment.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-deployment.yaml @@ -16,7 +16,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.cainjector.replicaCount }} - {{- if ne (quote .Values.global.revisionHistoryLimit) (quote "") }} + {{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }} revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }} {{- end }} selector: @@ -61,7 +61,7 @@ spec: image: "{{ template "image" (tuple .Values.cainjector.image $.Chart.AppVersion) }}" imagePullPolicy: {{ .Values.cainjector.image.pullPolicy }} args: - {{- if ne (quote .Values.global.logLevel) (quote "") }} + {{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }} - --v={{ .Values.global.logLevel }} {{- end }} {{- with .Values.global.leaderElection }} diff --git a/deploy/charts/cert-manager/templates/deployment.yaml b/deploy/charts/cert-manager/templates/deployment.yaml index bc4f8d970..e673176bd 100644 --- a/deploy/charts/cert-manager/templates/deployment.yaml +++ b/deploy/charts/cert-manager/templates/deployment.yaml @@ -15,7 +15,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.replicaCount }} - {{- if ne (quote .Values.global.revisionHistoryLimit) (quote "") }} + {{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }} revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }} {{- end }} selector: @@ -79,7 +79,7 @@ spec: image: "{{ template "image" (tuple .Values.image $.Chart.AppVersion) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: - {{- if ne (quote .Values.global.logLevel) (quote "") }} + {{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }} - --v={{ .Values.global.logLevel }} {{- end }} {{- if .Values.config }} diff --git a/deploy/charts/cert-manager/templates/webhook-deployment.yaml b/deploy/charts/cert-manager/templates/webhook-deployment.yaml index c010ba160..326a3ed1e 100644 --- a/deploy/charts/cert-manager/templates/webhook-deployment.yaml +++ b/deploy/charts/cert-manager/templates/webhook-deployment.yaml @@ -15,7 +15,7 @@ metadata: {{- end }} spec: replicas: {{ .Values.webhook.replicaCount }} - {{- if ne (quote .Values.global.revisionHistoryLimit) (quote "") }} + {{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }} revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }} {{- end }} selector: @@ -66,7 +66,7 @@ spec: image: "{{ template "image" (tuple .Values.webhook.image $.Chart.AppVersion) }}" imagePullPolicy: {{ .Values.webhook.image.pullPolicy }} args: - {{- if ne (quote .Values.global.logLevel) (quote "") }} + {{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }} - --v={{ .Values.global.logLevel }} {{- end }} {{- if .Values.webhook.config }}