Learning to create helm chart.
My values.yaml
:
image:
repository: myimage
tag: latest
Inside my deployment.yaml, I am trying to do image: {{ (.Values.image).repository }}:{{ (.Values.image).tag }}
, which gives the following error: mapping values are not allowed in this context
.
image: {{ (.Values.image).repository }}:latest
does not print the repository
value from the values.yaml. No errors given. (testing using helm template demochart).
Right now, I do not have _helpers.tpl
. Is that file necessary? My current file structure:
demochart
|-- Chart.yaml
|-- templates
| `-- deployment.yaml
`-- values.yaml
If I do image: {{ .Values.image.repository }}:latest
, this gives at <.Values.image.repository>: nil pointer evaluating interface {}.repository
.
What I am doing wrong?
Do I need to include values.yaml
somewhere? if yes, how?