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

Overwrite/Replace existing resources

Open MartinEmrich opened this issue 3 years ago • 0 comments

Today I have sort of a feature request/discussion topic:

I try to migrate existing resources already existing on the K8s clusters (applied using flux1, manually or via Kustomizations) to Helm charts with flux HelmRelease resources.

I guess this is a widespread use case (get onboard with helm, and pack all existing manually-applied manifests in nice Helm charts).

But apparently, the Helm Project itself has a very strong attachment to its "ownership" concept. This seems to be very controversial (for reasons beyond me), see e.g. https://github.com/helm/helm/issues/2730 or https://github.com/helm/helm/issues/10304. Some users have made workarounds (e.g. https://github.com/HamzaZo/helm-adopt), but these all rely on "direct" helm CLI interaction.

How can this be achieved with Flux and the helm-controller, where these workarounds (basically render out the templated helm manifests, extract all resources, and label them with these helm ownership annotations before actually applying the chart) cannot be done manually?

Could one do the workarounds nevertheless (by painstakingly making sure that all Values are identical), and then apply the corresponding HelmRelease manifest afterwards?

MartinEmrich avatar Jan 26 '23 13:01 MartinEmrich