'Helm values.yaml issue
I have a Helm chart containing the following contents:
# parentchart/charts/subchart/templates/test.yaml
chart: {{ .Values }}
# parentchart/values.yaml
xyz: def
subchart:
abc:
param:
ankit: kansal
# parentchart/charts/subchart/values.yaml
abc:
param1:
ankit: kansal
But while templating this chart using values.yaml and in other case without using values.yaml. I am seeing different values of .Values.
Scenario 1, without passing values.yaml: if I run helm template fm parentchart it outputs
---
# Source: parentchart/charts/subchart/templates/test.yaml
chart: map[abc:map[param:<nil> param1:<nil>] ankit:kansal global:map[]]
Scenario 2, passing the following values.yaml:
# values.yaml
xyz: def
subchart:
abc:
param:
ankit: kansal
helm template fm parentchart -f values.yaml outputs:
---
# Source: parentchart/charts/subchart/templates/test.yaml
chart: map[abc:map[param1:<nil>] ankit:kansal global:map[]]
Not sure why I'm not getting "param" as nil in Scenario 2 as I have passed the same in values.yaml from outside.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
