Interview Prep/Helm/Chart Structure & Metadata

What does the `templates/` directory contain and how are files treated?

BeginnerConceptChart Structure & Metadata
Answer

Every file in templates/ is rendered through the template engine. Files producing YAML are sent to Kubernetes; a file can contain multiple documents separated by ---. Exceptions:

  • Files starting with _ (like _helpers.tpl) are not emitted as manifests; they hold define blocks.
  • NOTES.txt is rendered and printed to the user after install or upgrade.
  • Files that render to only whitespace or comments are skipped, which is how {{- if .Values.ingress.enabled }} wrappers work.

Subdirectories such as templates/tests/ are rendered too.

All Helm questions Roadmap: Helm

More on Chart Structure & Metadata