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

allow dependsOn to match on HelmRelease labels

Open Carles-Figuerola opened this issue 2 years ago • 2 comments

the current dependsOn implementation requires HelmRelease object names. A very useful and modular solution would be to allow passing a label matcher to find the requested array of HelmRelease objects to depend on:

https://github.com/fluxcd/helm-controller/blob/2195310e7c2cdeb201b4b99d4655d2b62800f6f1/controllers/helmrelease_controller.go#L451-L475

Carles-Figuerola avatar Oct 25 '22 16:10 Carles-Figuerola

Using labels would break the dependsOn functionality. At cluster bootstrap, some HelmReleases may end up in etcd faster than others. Without knowing a dependency name, Flux can't wait for the creation and will just go head and install the charts in the wrong order.

stefanprodan avatar Oct 26 '22 06:10 stefanprodan

Thanks, that's a good point, if the HR element does not exist, the dependency "looks" valid.

Carles-Figuerola avatar Oct 26 '22 13:10 Carles-Figuerola