I have a use case to check if a particular key is empty. the logic is below:
{{- if or (ne $k "zzz") (quote $.Values.abc.xyz.ppp | empty ) }}
This works fine if .Values.abc.xyz
is present, but if xyz
is missing, this fails with error:
error calling index: index of untyped nil
I looked at few other stack overflow, but could not get it to work. I tried something like default dict, but that did not work too.
{{- $overrides := index .Values.abc.xyz | default dict }}
Any pointers would be helpful.