Interview Prep/Helm/Templating: Go Templates & Sprig

What is the `.Template` object good for?

AdvancedConceptTemplating: Go Templates & Sprig
Answer

.Template.Name is the path of the current file (shop/templates/api-deployment.yaml) and .Template.BasePath is the chart's templates directory (shop/templates). Uses:

checksum/config: {{ include (print $.Template.BasePath "/api-configmap.yaml") . | sha256sum }}
{{- fail (printf "%s: image.repository is required" .Template.Name) }}

Inside subcharts, BasePath points at the subchart's templates directory.

All Helm questions Roadmap: Helm

More on Templating: Go Templates & Sprig