0

I saw the following Helm from time to time, but I didn't understand how it works.

{{- include "common.tplvalues.render" ( dict "value" .Values.abc.service.annotations "context" $) | nindent 4 }}

First, where is the definition of common.tplvalues.render? I searched all over the internet, and seems that this is related to Bitnami? Or it is a built-in function provided by Helm?

Second, I understand how to create a dictionary by reading this doc about template functions. However, why create a dictionary named value in this situation?

Third, the usage of $ sign. In this official doc about variables, it stated that '$ - this variable will always point to the root context'. What is 'root context'? Is this 'root context' related to the 'context' parameter of the 'value' dictionary?

Blaise Wang
  • 556
  • 5
  • 17
  • 1
    See, in order, https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_tplvalues.tpl; [Calling a template with several pipeline parameters](https://stackoverflow.com/questions/18276173/calling-a-template-with-several-pipeline-parameters); and [Helm range without leaving global scope](https://stackoverflow.com/questions/55213545/helm-range-without-leaving-global-scope) (especially its [accepted answer](/a/55257763)). – David Maze Feb 20 '23 at 12:05

0 Answers0