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

The specified initialization vector (IV) does not match the block size for this algorithm