Missing value at path for something that is nested in an if statement
iammoen opened this issue · comments
We are using a chart that has a lot of values that will only be put into the output of helm if the value path exists. Example:
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
{{- end }}
But when I lint this it tells me that "Missing value at path [.Values.image.pullSecret]" for the 3rd line. Even putting a default value in for it doesn't stop the lint error. Thoughts on making the linter ok with the value path being called in an if statement?
Hey @iammoen
I will try to reproduce that in the next days. I am sure there will be a fix shortly :)
Rad! Thanks for all you do!
Aside from the fact that making the linter aware of the {{ .Values.foo }}
being inside an if-block is quite complicated I am not sure if this is how I want the linter to behave.
For now I made some changes that the linter will not kick when there is a default defined.
I hope this is something you can work with :)
Released with v0.7.3