Skip to main content

Helm

Official module: dagger/helm

Install with dagger mod install github.com/dagger/helm.

What It Is​

The Helm module validates Helm charts.

It discovers charts in the workspace, lints them, and checks that values files render with helm template --dry-run=client.

Use It For​

  • Check chart structure with Helm lint.
  • Check that values files render cleanly.
  • Catch chart problems before a PR reaches a cluster.
  • Share the same Helm version across a workspace.

Main Workflows​

  • lint: run Helm lint on every discovered chart.
  • assert-template: render discovered values files and fail if templating breaks.
  • charts: see which charts the module finds.

How to Use It​

Install the module, then run its checks:

dagger mod install github.com/dagger/helm

dagger check # run every check in the workspace
dagger check helm:lint # lint every discovered chart
dagger check helm:assert-template # render discovered values files and fail on errors

The module discovers charts by finding every Chart.yaml in the workspace and treats the containing directory as the chart root, so templates, subcharts, CRDs, and files referenced through .Files are all available to Helm.

lint runs helm lint against each chart's default values, and once more for each discovered values file. assert-template renders each values file with helm template --dry-run=client and fails if templating breaks; it intentionally skips the bare chart, since some charts only render with one of their explicit values files.

Settings​

List the current settings and their values with dagger settings helm, then set one with dagger settings helm <key> <value>. Settings are stored in .dagger/config.toml under [modules.helm.settings].

  • version (default 3.18.4): the Helm version used for lint and template. Pin it so local runs and CI use the same Helm release.
  • valuesGlob (default ci/*-values.yaml): a glob, relative to each chart root, that selects the values files to check. Every matching file becomes a separate scenario in both lint and assert-template. The default follows Helm chart-testing's CI convention, so files like ci/prod-values.yaml are picked up automatically.
dagger settings helm version 3.18.4
dagger settings helm valuesGlob "ci/*-values.yaml"

To check a chart under several configurations, add more values files that match the glob. With the default glob, the chart below is rendered and linted once per file under ci/:

charts/api/
Chart.yaml
values.yaml
ci/
prod-values.yaml
minimal-values.yaml

Workspace Fit​

Use this module for repos that ship Kubernetes applications with Helm. It is a strong PR check because it validates chart changes before deploy tooling sees them.

Source​

Source repo: github.com/dagger/helm