fluxcd-community / helm-charts

Community maintained Helm charts for Flux
Apache License 2.0
121 stars 76 forks source link

Add chart for creating HelmRepository #100

Closed bearzz22 closed 2 years ago

bearzz22 commented 2 years ago

What this PR does / why we need it:

Adds the option for deploying a HelmRepository k8s object to the flux2-sync chart.

Special notes for your reviewer:

Checklist

bearzz22 commented 2 years ago

This breaks the current chart usage, people don't expect to get a HelmRepository if they set values for a GitRepo and Kustomization. I think for HelmRepos and HelmReleases we need a different chart.

Makes sense, thanks! I'll create a separate chart for HelmRepository (guess for HelmReleases people would usually have own charts for their various things)

stefanprodan commented 2 years ago

It could be something like helm-sync where you can define HelmRepos and HelmReleases.

Anyway I really don’t see the usefulness of this, if you are using Flux, then all these Helm manifests should be placed in Git and applied by Flux, not by helm the CLI.

bearzz22 commented 2 years ago

It could be something like helm-sync where you can define HelmRepos and HelmReleases.

Anyway I really don’t see the usefulness of this, if you are using Flux, then all these Helm manifests should be placed in Git and applied by Flux, not by helm the CLI.

Thanks - perhaps I have missed something but we are upgrading to flux v2 now and our understanding is that all HelmReleases objects need a HelmRepository k8s object now which needs to exist before any HelmReleases object is applied to the cluster. We use Terraform to deploy the cluster and any other pods and resources required and therefore thought we could use a Helm chart to deploy the HelmRepository object at the same time. If we instead let flux/kustomize apply the content of the Git repository which then contains multiple HelmReleases and a HelmRepository, is there going to be a chance where the HelmReleases fail due to the HelmRepository not being read by flux and initialized?

stefanprodan commented 2 years ago

If we instead let flux/kustomize apply the content of the Git repository which then contains multiple HelmReleases and a HelmRepository, is there going to be a chance where the HelmReleases fail due to the HelmRepository not being read by flux and initialized?

Sure, Flux will know how deal with it, even if the HelmRepo takes a long time to sync, once it's ready, that will trigger all HelmReleases and they will reconcile.

bearzz22 commented 2 years ago

If we instead let flux/kustomize apply the content of the Git repository which then contains multiple HelmReleases and a HelmRepository, is there going to be a chance where the HelmReleases fail due to the HelmRepository not being read by flux and initialized?

Sure, Flux will know how deal with it, even if the HelmRepo takes a long time to sync, once it's ready, that will trigger all HelmReleases and they will reconcile.

Thanks! Closing this PR then and will deploy the HelmRepository object using flux instead.