8000 add comments that explain the empty value trick · cert-manager/cert-manager@9f00466 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f00466

Browse files
inteonjetstack-bot
authored andcommitted
add comments that explain the empty value trick
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
1 parent 201223a commit 9f00466

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

deploy/charts/cert-manager/templates/cainjector-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ metadata:
1616
{{- end }}
1717
spec:
1818
replicas: {{ .Values.cainjector.replicaCount }}
19+
{{- /* The if statement below is equivalent to {{- if $value }} but will also return true for 0. */ -}}
1920
{{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }}
2021
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
2122
{{- end }}
@@ -61,6 +62,7 @@ spec:
6162
image: "{{ template "image" (tuple .Values.cainjector.image $.Chart.AppVersion) }}"
6263
imagePullPolicy: {{ .Values.cainjector.image.pullPolicy }}
6364
args:
65+
{{- /* The if statement below is equivalent to {{- if $value }} but will also return true for 0. */ -}}
6466
{{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }}
6567
- --v={{ .Values.global.logLevel }}
6668
{{- end }}

deploy/charts/cert-manager/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ metadata:
1515
{{- end }}
1616
spec:
1717
replicas: {{ .Values.replicaCount }}
18+
{{- /* The if statement below is equivalent to {{- if $value }} but will also return true for 0. */ -}}
1819
{{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }}
1920
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
2021
{{- end }}
@@ -79,6 +80,7 @@ spec:
7980
image: "{{ template "image" (tuple .Values.image $.Chart.AppVersion) }}"
8081
imagePullPolicy: {{ .Values.image.pullPolicy }}
8182
args:
83+
{{- /* The if statement below is equivalent to {{- if $value }} but will also return true for 0. */ -}}
8284
{{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }}
8385
- --v={{ .Values.global.logLevel }}
8486
{{- end }}

deploy/charts/cert-manager/templates/webhook-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ metadata:
1515
{{- end }}
1616
spec:
1717
replicas: {{ .Values.webhook.replicaCount }}
18+
{{- /* The if statement below is equivalent to {{- if $value }} but will also return true for 0. */ -}}
1819
{{- if not (has (quote .Values.global.revisionHistoryLimit) (list "" (quote ""))) }}
1920
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
2021
{{- end }}
@@ -66,6 +67,7 @@ spec:
6667
image: "{{ template "image" (tuple .Values.webhook.image $.Chart.AppVersion) }}"
6768
imagePullPolicy: {{ .Values.webhook.image.pullPolicy }}
6869
args:
70+
{{- /* The if statement below is equivalent to {{- if $value }} but will also return true for 0. */ -}}
6971
{{- if not (has (quote .Values.global.logLevel) (list "" (quote ""))) }}
7072
- --v={{ .Values.global.logLevel }}
7173
{{- end }}

0 commit comments

Comments
 (0)
0