Search code examples
kubernetes-helmhelmfile

helmfile diff fails with "executing "stringTemplate" at <.Values.db.password>: map has no entry for key "password""


if condition fails if "password" does not exist under "db":

{{- if .Values.db.password }}

I can fix this by using:

{{- if hasKey .Values.db "password" }}

However, I'm pretty sure it is working even without this fix in other environments and trying to understand what is wrong with my setup.

helm version client and server have both version v2.16.10


Solution

  • This was due to some other issues in my environment and not related to the way helm files are rendered. Once I excluded helm secrets, helmfile diff worked