File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
charts/nginx-gateway-fabric/templates Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -102,5 +102,7 @@ Filters out empty fields from a struct.
102
102
{ {- $result = merge $result (dict $key $value ) } }
103
103
{ {- end } }
104
104
{ {- end } }
105
- { {- $result | toYaml } }
105
+ { {- if $result } }
106
+ { {- $result | toYaml } }
107
+ { {- end } }
106
108
{ {- end } }
Original file line number Diff line number Diff line change 18
18
{{- toYaml .Values.nginx.pod | nindent 8 }}
19
19
{{- end }}
20
20
container :
21
- {{- if .Values.nginx.container }}
22
- {{- toYaml .Values.nginx.container | nindent 8 }}
21
+ {{- if .Values.nginx.container }}
22
+ {{- with .Values.nginx.container }}
23
+ {{- include "filterEmptyFields" . | nindent 8 }}
23
24
{{- end }}
25
+ {{- end }}
24
26
image :
25
27
{{- toYaml .Values.nginx.image | nindent 10 }}
26
28
{{- if .Values.nginx.debug }}
34
36
{{- toYaml .Values.nginx.pod | nindent 8 }}
35
37
{{- end }}
36
38
container :
37
- {{- if .Values.nginx.container }}
38
- {{- toYaml .Values.nginx.container | nindent 8 }}
39
+ {{- if .Values.nginx.container }}
40
+ {{- with .Values.nginx.container }}
41
+ {{- include "filterEmptyFields" . | nindent 8 }}
39
42
{{- end }}
43
+ {{- end }}
40
44
image :
41
45
{{- toYaml .Values.nginx.image | nindent 10 }}
42
46
{{- if .Values.nginx.debug }}
You can’t perform that action at this time.
0 commit comments