Helm
Medium
Templates
What function can be used in templates to include other template blocks defined with 'define'?
Select your answer:
Show answer and explanation
Answer: include
Explanation
include renders a template defined with define and returns it as a string, so you can pipe the result, as in {{ include "mychart.labels" . | nindent 4 }}. The built-in template action renders too, but its output can't be piped, which is why charts use include.
More medium Helm questions
- What file locks dependency versions for reproducible installs?
- Which flag to 'helm install' will wait until resources are ready before marking the release as deployed?
- Which flag to 'helm uninstall' keeps the release history but removes resources?
- What template object provides access to files inside the chart package (like files in the 'files/' dir)?
- Which function allows templates to fail with a custom error if a required value is missing?
- What is an OCI registry in the context of Helm?