Sitemap

DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

The Complete Guide to Helm: From Zero to Production Mastery 2/3

14 min readAug 27, 2025

--

A comprehensive journey through Kubernetes package management for DevOps and Platform Engineers

Advanced Templating and Configuration {#advanced-templating}

Press enter or click to view image in full size
Advanced Template Patterns

As your Helm skills develop, you’ll need to master advanced templating techniques for complex deployments.

Helper Templates (_helpers.tpl)

Helper templates promote reusability and maintain consistency across your charts:

{{/*
Expand the name of the chart.
*/}}
{{- define "my-web-app.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "my-web-app.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "my-web-app.labels" -}}
helm.sh/chart: {{ include "my-web-app.chart" . }}
{{ include "my-web-app.selectorLabels" . }}
{{- if .Chart.AppVersion }}…

--

--

DevOps.dev

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Salwan Mohamed

Written by Salwan Mohamed

Devops and platform Engineer passionate about cloud, Kubernetes, openshift. Experienced in building scalable infrastructure, ensuring high availability.