helm-controller icon indicating copy to clipboard operation
helm-controller copied to clipboard

How to select which pre-release I want to install

Open silveraignacio opened this issue 1 year ago • 6 comments

Hello! We have implemented Flux CD on our project, and now we are having the following issue:

We have all the helm charts on the same repo, but we are tagging it different depending on the environment. We have 3 environments, dev, uat and prod.

We decided that all the helm charts that will be installed on production, will be Release versions like 1.10.1, and charts for uat and dev, will be pre-release versions but differentiated by the postfix, for example for dev will be 1.10.1-dev and for uat will be 1.10.1-uat.

The issue that we are having now, is that we cannot filter by postfix of which version we will install on the environment. We are using semver in flux, so dev and uat are taking the same chart version due of this. In this case version 1.10.1-uat is the last pre-release available and it will be installed in dev and in UAT.

Below you can find one of our config files:

Devel

kind: HelmRelease
metadata:
  name: myhelmrelease
  namespace: default
spec:
  chart:
    spec:
      version: "1.x-devel"
  values:
    ingress:

UAT

kind: HelmRelease
metadata:
  name: myhelmrelease
  namespace: default
spec:
  chart:
    spec:
      version: "1.x-uat"
  values:
    ingress:

So, there is any way to say to Flux use charts with this specifc Postfix or add some kind of filter?

We have deployed Flux on our kubernetes cluster and kustomize-controller, source-controller, helm-controller and notification-controller were deployed.

Thanks in advance!

silveraignacio avatar Sep 01 '22 10:09 silveraignacio

Related:

  • https://github.com/fluxcd/flux2-kustomize-helm-example/issues/75

I think there might be an issue here for Helm Controller, since you can already filter tags in ImageUpdateAutomation, but there is no corresponding filter tags feature in Helm Controller there's no way to set a wildcard that filters prereleases.

Do we want to support this behavior in Helm Controller? I'll leave this issue open until there is consensus, or at least one other Flux maintainer can weigh in. 👍

kingdonb avatar Sep 07 '22 12:09 kingdonb