Skip to content

Can't change chart name without triggering uninstall (flux 2.2.x) #870

@artem-nefedov

Description

@artem-nefedov

We were relying on ability to change chart name (spec.chart.spec.chart field) in existing HelmRelease without deletion of underlying resources. The charts in question are similar internally, but are stored with different names. This worked fine in flux 2.1.x and older, but since 2.2.x we noticed that changing chart name would always trigger uninstall and re-install from scratch, which causes problems.

Controller log contains the following line:

release target configuration changed (chart name): running uninstall for current release

It looks like these are responsible code parts:
https://github.com/fluxcd/helm-controller/blob/v0.37.2/internal/controller/helmrelease_controller.go#L321
https://github.com/fluxcd/helm-controller/blob/v0.37.2/internal/action/verify.go#L69

It would be great if there was at least an option to disable uninstall in such scenario, especially since it was working perfectly fine before. It would be helpful even in simple scenarios where chart maintainer decided to change chart name, and sudden uninstall can lead to nasty side effects, especially if chart installs CRDs. I'm not in the clear why such dependency is even needed, given that release name is not tied to chart name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions