0Pricing
Helm Academy · Lesson

Passing Scope into a Named Template

Sending the right context object to a partial.

Partials Need Context

A named template can only read what you hand it. The second argument to include is the scope, the dot the partial will see inside.

{{ include "mychart.labels" . }}

The Dot Is the Scope

That trailing dot is the current context. Passing the root dot gives the partial access to .Values, .Release, and .Chart.

All lessons in this course

  1. Defining a Partial with define
  2. Inserting Partials with template and include
  3. The Standard Fullname and Labels Helpers
  4. Passing Scope into a Named Template
← Back to Helm Academy