CoursesFluxIntermediate

HelmRelease & the helm-controller

Charts, the GitOps way.

Advanced14 min · lesson 5 of 12

Flux manages Helm charts through the helm-controller and the HelmRelease CRD — declarative, GitOps-native Helm. You define a HelmRelease that references a chart (from a HelmRepository, a GitRepository, or an OCIRepository source) and supplies values; the controller installs and upgrades the release, tracks its history, and can roll back automatically on a failed upgrade. It is Helm’s power without ever running helm install by hand, all reconciled from Git.

helmrelease.yaml
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata: { name: ingress-nginx, namespace: flux-system }
spec:
interval: 10m
chart:
spec:
chart: ingress-nginx
version: "4.11.x"
sourceRef: { kind: HelmRepository, name: ingress-nginx }
values:
controller: { replicaCount: 2 }
install: { remediation: { retries: 3 } }
upgrade: { remediation: { retries: 3, remediateLastFailure: true } }

Remediation and values

The remediation settings are a standout: on a failed install or upgrade, the helm-controller retries and can roll back to the last working release automatically, so a bad chart version does not leave you broken. Values come from the HelmRelease (and can be composed from ConfigMaps/Secrets), keeping per-environment config in Git. As always, keep secret values out of Git — reference a Secret or use SOPS (later). This is the Helm course applied through Flux’s reconcile loop.

terminal
$ flux get helmreleases -A
NAMESPACE NAME REVISION READY MESSAGE
flux-system ingress-nginx 4.11.1 True Helm upgrade succeeded
$ flux reconcile helmrelease ingress-nginx
Pin chart versions; a floating range auto-upgrades prod
A HelmRelease chart version like "4.11.x" or ">=4.0.0" lets the helm-controller upgrade automatically when a new matching chart appears — convenient in dev, risky in prod where an unattended chart upgrade can change behavior. Pin exact versions for production and bump them deliberately through Git; reserve semver ranges for environments where continuous chart updates are intended and watched.