0PricingLogin
Helm Academy · Lesson

Defining a Partial with define

Declaring a reusable named template block.

Why Repeat Yourself?

The same labels and names get copied into every manifest in a chart. A named template lets you write that block once and reuse it everywhere.

Meet the define Action

You declare a reusable block with the define action. It names a chunk of template text but does not render anything on its own.

{{- define "mychart.labels" -}}
app: my-app
{{- end -}}

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