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

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type