The parent key is missing, misspelled or null
Commonvalues.yaml has no database block, a values file spells it differently, or an override sets it to null.
Confirm
helm get values RELEASE --all helm show values .
Whether the parent key exists, with exactly the spelling the template uses
Fix
- Default the parent: {{ (.Values.database | default dict).host | default "localhost" }}.
- Or skip the lines when it is missing: wrap them in {{- with .Values.database }} … {{- end }} and write .host inside.
- Or fail with a clear message: {{ required "database.host is required" (.Values.database).host }}.
- Or dig with the values as a map: {{ dig "database" "host" "localhost" .Values.AsMap }}; plain .Values fails.
- Add the key to values.yaml with a sensible default, so the chart documents it.
host: {{ (.Values.database | default dict).host | default "localhost" | quote }}Reproduced on Helm 3.18.2: rendered localhost without the key, and the set value with --set database.host=db.