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

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error