Built-in Objects and Values
What you'll learn: How to access critical context information in Helm templates using built-in objects like .Values, .Release, .Chart, and .Capabilities.
When you write Helm templates, you're not working in a vacuum—you need information about the chart, the current release, user-provided values, and the Kubernetes cluster. Helm provides built-in objects that act as data containers, giving your templates access to this essential context.
The Four Core Built-in Objects
.Values — This object holds all the values you've defined in your values.yaml file, plus any overrides passed during installation or upgrade. Think of it as your configuration dictionary. Access nested values with dot notation: .Values.image.repository.
.Release — Contains metadata about the current release instance. Key fields include .Release.Name (the release name you chose), .Release.Namespace (where it's deployed), .Release.IsInstall (boolean indicating first install), and .Release.IsUpgrade.
.Chart — Provides access to your Chart.yaml metadata. Use .Chart.Name for the chart name, .Chart.Version for the version, .Chart.AppVersion, and other fields you defined in your chart metadata.
.Capabilities — Reveals information about the Kubernetes cluster itself. .Capabilities.KubeVersion tells you which Kubernetes version is running, letting you conditionally adjust templates for API compatibility.
Why This Matters
These objects turn static templates into dynamic, context-aware manifests. You might use .Values to inject a custom image tag, .Release.Name to create unique resource names, .Chart.Version in labels for tracking, or .Capabilities.KubeVersion to handle API deprecations gracefully.
Key Takeaway: Helm's built-in objects (.Values, .Release, .Chart, .Capabilities) give templates access to user configuration, release metadata, chart information, and cluster capabilities—making your charts flexible and context-aware.