Back to docs
Recipe

Recipe: Helm chart values writer

Generate production‑grade values.yaml files from Meridian secrets with full template interpolation.

Overview

This recipe wires Meridian into your Helm chart pipeline. Secrets stored in Meridian are injected into a Go‑templated values file, then fed directly to helm install or helm upgrade. No plaintext secrets ever touch disk.

Prerequisites

  • Meridian CLI v2.1+ installed and authenticated
  • A project with at least one environment configured
  • Helm 3.12+ on the deployment host

Quick start

meridian export --env production \
  --template values.yaml.tmpl \
  --out values.yaml

helm upgrade my-release ./chart \
  -f values.yaml --install

The --template flag points to a Go‑template file. Meridian replaces {{ .Secrets.KEY }} placeholders with live values.

Template example

# values.yaml.tmpl
database:
  host: {{ .Secrets.DB_HOST }}
  password: {{ .Secrets.DB_PASS }}
redis:
  url: {{ .Secrets.REDIS_URL }}

CI/CD integration

Run the export step before your Helm command in GitHub Actions, GitLab CI, or Argo Workflows. Meridian authenticates via the MERIDIAN_TOKEN environment variable — no interactive login required.

Tip: Use --dry-run to preview the rendered values file without writing to disk.