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