Transform Helm values with template functions and pipelines
Answer: Values placed into a Helm template are unmodified unless you transform them. When injecting strings from the .Values object into the template, quote those strings. Call the quote function in the template directive: {{ quote .Values.favorite.drink }}. Template functions follow the syntax functionName arg1 arg2....
Where the functions come from
Helm has over 60 functions. Some come from the Go template language itself. Most of the others are part of the Sprig template library. The Helm template language is not a separate language. It combines the Go template language, some extra functions, and wrappers that expose certain objects to the templates.
The function list
The published function list includes string helpers such as quote, squote, upper, trim, trimPrefix, trimSuffix, replace, split, substr, trunc, repeat, and wrap. print returns a string from the combination of its parts. Types that are not strings are converted to strings where possible. When two adjacent arguments are not strings, a space is added between them. println is like print, and it adds a new line at the end. printf builds a string from a formatting string and arguments passed in order.
| quote | print | |---|---| | quote | Quote strings from .Values | | print | A string from the combination of its parts | | println | Like print, then add a new line | | printf | A formatting string and the arguments in order | | trim / trimPrefix / trimSuffix | Trim a prefix or suffix | | replace / split / substr | replace, split, or substr a string |
A small ConfigMap template uses quote on each favorite value so YAML sees them as quoted strings.
See also
Claims
- id: C1 claim: Quote strings from .Values when you inject them into a template. source: S1 evidence: "we ought to quote these strings"
- id: C3 claim: Template functions use the form functionName followed by arguments. source: S1 evidence: "Template functions follow the syntax
functionName arg1 arg2..."
- id: C4 claim: The function list includes quote, print, printf, and related string helpers. source: S2 evidence: "Returns a string from the combination of its parts"
Sources
- [S1] Functions and Pipelines. Helm (GitHub docs). https://raw.githubusercontent.com/helm/helm-www/main/docs/chart_template_guide/functions_and_pipelines.mdx . License: MIT. Accessed 2026-11-19.
- [S2] Function List. Helm docs. https://helm.sh/docs/chart_template_guide/function_list/ . License: MIT. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Helm (GitHub docs), Functions and Pipelines; Helm docs, Function List. MIT; MIT. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Helm (GitHub docs), Functions and Pipelines; Helm docs, Function List. MIT; MIT.
Cite this
iinventedlight. 2026. "Transform Helm values with template functions and pipelines." iinventedlight Library, iil:note:mwbs2d3w, version of 2026-11-19. https://iinventedlight.com/library/notes/helm-template-functions/. License: CC-BY-4.0.
@misc{iil_note_mwbs2d3w,
author = {{iinventedlight}},
title = {{Transform Helm values with template functions and pipelines}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/helm-template-functions/},
note = {Permanent ID iil:note:mwbs2d3w. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- helm-template-functions.table.json (table; CC-BY-4.0)
- helm-template-functions.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/helm-template-functions.md.