tpl

Function tpl 

Source
pub fn tpl(
    state: &State<'_, '_>,
    template: String,
    context: Value,
) -> Result<String, Error>
Expand description

Evaluate a string as a template (Helm’s tpl function)

Usage: {{ tpl(values.dynamicTemplate, ctx) }}

This allows template strings stored in values to contain Jinja expressions. The context parameter provides the variables available to the nested template.

§Security Features (Sherpack improvements over Helm)

  • Recursion limit: Maximum depth of 10 to prevent infinite loops
  • Source tracking: Better error messages showing template origin

§Example

In values.yaml:

host: "{{ release.name }}.example.com"

Then in template:

host: {{ tpl(values.host, {"release": release}) }}

Result: host: myrelease.example.com