helm - using condtional if to reliably check for nil value
If you're within a scope
{{- if and ($.Values.envs) ($.Values.envs.demo) }}
- name: ok
value: oktoo
{{- end}}
If you're not within any scope
{{- if and (.Values.envs) (.Values.envs.demo) }}
- name: ok
value: oktoo
{{- end}}
Comments