Skip to content

flux migrate logic to ssa/manager_apply #5689

@szihai

Description

@szihai

In flux migrate, there is a specific piece of logic handling the storageVersion change from v2beta1 to v2.
https://github.com/fluxcd/flux2/blob/main/cmd/flux/migrate.go#L288C1-L318C2
If users forget to run migrate before upgrade, it could cause catastrophic problems combined with "-f" when upgrading. i.e removing all the crds and helmreleases.
Since this is a special version upgrade, why not moving the logic to https://github.com/fluxcd/pkg/blob/main/ssa/manager_apply.go#L256C27-L256C41
This will make sure the upgrade at least will not delete everything because of the version mismatch in crd.

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