Skip to content

Commit 3046073

Browse files
committed
Use with instead of if.
1 parent e839938 commit 3046073

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

charts/gateway/templates/deployment.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ kind: Deployment
33
metadata:
44
name: {{ include "conduktor-gateway.fullname" . }}
55
labels: {{- include "conduktor-gateway.labels" . | nindent 4 }}
6-
{{- if .Values.commonLabels }}
7-
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
6+
{{- with .Values.commonLabels }}
7+
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
88
{{- end }}
99
annotations:
10-
{{- if .Values.commonAnnotations }}
11-
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
10+
{{- with .Values.commonAnnotations }}
11+
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 4 }}
1212
{{- end }}
1313
spec:
1414
selector:
@@ -19,23 +19,23 @@ spec:
1919
template:
2020
metadata:
2121
annotations:
22-
{{- if .Values.commonAnnotations }}
23-
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
22+
{{- with .Values.commonAnnotations }}
23+
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }}
2424
{{- end }}
25-
{{- if .Values.gateway.podAnnotations }}
26-
{{- include "common.tplvalues.render" (dict "value" .Values.gateway.podAnnotations "context" $) | nindent 8 }}
25+
{{- with .Values.gateway.podAnnotations }}
26+
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
2727
{{- end }}
2828
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2929
checksum/self-secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
3030
{{- if .Values.gateway.secretSha256sum }}
3131
checksum/secret: {{ .Values.gateway.secretSha256sum }}
3232
{{- end }}
3333
labels: {{- include "conduktor-gateway.labels" . | nindent 8 }}
34-
{{- if .Values.gateway.podLabels }}
35-
{{- include "common.tplvalues.render" (dict "value" .Values.gateway.podLabels "context" $) | nindent 8 }}
34+
{{- with .Values.gateway.podLabels }}
35+
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
3636
{{- end }}
37-
{{- if .Values.commonLabels }}
38-
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
37+
{{- with .Values.commonLabels }}
38+
{{- include "common.tplvalues.render" ( dict "value" . "context" $ ) | nindent 8 }}
3939
{{- end }}
4040
spec:
4141
containers:

0 commit comments

Comments
 (0)