Upgrade Advisory

This documentation is for Flux (v1) and Helm Operator (v1). Both projects are in maintenance mode and will soon reach end-of-life. We strongly recommend you familiarise yourself with the newest Flux and start looking at your migration path.

For documentation regarding the latest Flux, please refer to this section.

Upgrade from beta (>=0.5.0) to stable (>=1.0.0)

Due to the Flux project joining the CNCF Sandbox and the API becoming stable, the Helm Operator has undergone changes that necessitate some changes to your HelmRelease resources.

The central difference is that the Helm Operator now works with resources of the kind HelmRelease in the API version helm.fluxcd.io/v1, the format of the resource is backwards compatible.

Here are some things to know:

  • The new operator will ignore the old custom resources (and the old operator will ignore the new resources).
  • Deleting a resource while the corresponding operator is running will result in the Helm release also being deleted
  • Deleting a CustomResourceDefinition will also delete all custom resources of that kind.
  • If both operators are running and both new and old custom resources defining a release, the operators will fight over the release.

The safest way to upgrade is to avoid deletions and fights by stopping the old operator. Replacing it with the new one (e.g., by changing the deployment, or re-releasing the Flux chart with the new version) will have that effect.

Once the old operator is not running, it is safe to deploy the new operator, and start replacing the old resources with new resources. You can keep the old resources around during this process, since the new operator will ignore them.

Updating custom resources

The only difference between the old resource format and the new is the changed API version.

Changing an old resource to a new resource is thus as simple as changing the apiVersion field to helm.fluxcd.io/v1.

As a full example, this is an old resource:

---
apiVersion: flux.weave.works/v1beta1
kind: HelmRelease
metadata:
  name: foobar
  namespace: foo-ns
spec:
 chart:
    git: git@example.com:user/repo
    path: charts/foobar
  values:
    image:
      repository: foobar
      tag: v1

The new custom resource would be:

---
apiVersion: helm.fluxcd.io/v1       # <- change API version
kind: HelmRelease
metadata:
  name: foobar
  namespace: foo-ns
spec:
 chart:
    git: git@example.com:user/repo
    path: charts/foobar
  values:
    image:
      repository: foobar
      tag: v1

Deleting the old resources

Once you have migrated all your HelmRelease resources to the new API version and domain. You can remove all of the old resources by removing the old Custom Resource Definition.

kubectl delete crd helmreleases.flux.weave.works