Scoping a Block with with
Narrowing the dot to a subtree, and its pitfalls.
Stop Repeating Long Paths
Typing .Values.image.repository over and over gets noisy. The with action narrows the dot to a subtree so you can write shorter paths.
The with Action
A with block opens with {{ with SOMETHING }} and closes with {{ end }}. Inside it, the dot is reset to whatever you passed in.
{{ with .Values.image }}
repository: {{ .repository }}
tag: {{ .tag }}
{{ end }}