← All notes

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

Sources

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

Permanent ID: iil:note:mwbs2d3w

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.},
}

Markdown

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.

All artifact files (JSON index)

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.