LevelUpEducation / kubernetes-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error calling include: template: no template "temp.chart" associated with template "gotpl"

xxfroxx opened this issue · comments

Hi,

I am following up lesson 73 and I get the error below

Error: render error in "helm-chart-creation/templates/ghost-deployment.yaml": template: helm-chart-creation/templates/ghost-deployment.yaml:9:14: executing "helm-chart-creation/templates/ghost-deployment.yaml" at <include "temp.chart" .>: error calling include: template: no template "temp.chart" associated with template "gotpl"

I thought that I need to move the .tpl file in the same folder as the Chart.yaml, actually I did that, but it didn't work, still getting that error.

Could it be something wrong with this piece of code from the .tpl file?

Create chart name and version as used by the chart label.
*/}}
{{- define "temp.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Thanks.