Helm template functions
One of the common traits of any templating language is the ability to transform data. Thus far, when referring to .Values
or any of the other built-in objects within Helm, we have only made reference to the resource as-is, without any form of data manipulation. Where Helm really begins to shine and show its true power is its ability to perform complex data processing within templates through the use of template functions and pipelines.
Since Helm uses Go as the basis for its own templating language, it inherits the capabilities provided by functions. A Go template function is comparable to any other function that you may have interacted with in another programming language. Functions contain logic designed to consume certain inputs and provide an output based on the inputs that were provided.
When using Go templates, functions make use of the following syntax:
functionName arg1 arg2 . .
A function that is commonly used within Helm charts is the...