Skip to content

Helm chart upgrade from [email protected] to [email protected] failed: invalid stored version v2beta1 for crd helmrelease and other crd patch errors #5598

Description

@lambou123

The official upgrade procedure to Flux 2.7 or later is at: flux2/discussions/5572

Edited by Stefan Prodan 25 Feb 2026


Describe the bug

Helm install failed for release flux-system/fluxcd with chart [email protected]: cannot patch "helmreleases.helm.toolkit.fluxcd.io" with kind CustomResourceDefinition: CustomResourceDefinition.apiextensions.k8s.i │
│ o "helmreleases.helm.toolkit.fluxcd.io" is invalid: status.storedVersions[0]: Invalid value: "v2beta1": missing from spec.versions; v2beta1 was previously a storage version, and must remain in spec.versions until a storage migration e │
│ nsures no data remains persisted in v2beta1 and removes v2beta1 from status.storedVersions && cannot patch "alerts.notification.toolkit.fluxcd.io" with kind CustomResourceDefinition: CustomResourceDefinition.apiextensions.k8s.io "aler │
│ ts.notification.toolkit.fluxcd.io" is invalid: status.storedVersions[0]: Invalid value: "v1beta1": missing from spec.versions; v1beta1 was previously a storage version, and must remain in spec.versions until a storage migration ensure │
│ s no data remains persisted in v1beta1 and removes v1beta1 from status.storedVersions && cannot patch "providers.notification.toolkit.fluxcd.io" with kind CustomResourceDefinition: CustomResourceDefinition.apiextensions.k8s.io "provid │
│ ers.notification.toolkit.fluxcd.io" is invalid: status.storedVersions[0]: Invalid value: "v1beta1": missing from spec.versions; v1beta1 was previously a storage version, and must remain in spec.versions until a storage migration ensur │
│ es no data remains persisted in v1beta1 and removes v1beta1 from status.storedVersions && cannot patch "receivers.notification.toolkit.fluxcd.io" with kind CustomResourceDefinition: CustomResourceDefinition.apiextensions.k8s.io "recei │
│ vers.notification.toolkit.fluxcd.io" is invalid: status.storedVersions[0]: Invalid value: "v1beta1": missing from spec.versions; v1beta1 was previously a storage version, and must remain in spec.versions until a storage migration ensu │
│ res no data remains persisted in v1beta1 and removes v1beta1 from status.storedVersions

Is there a safe way to reinstall CRDs?

Steps to reproduce

Helm Chart Flux2 Upgrade from
https://artifacthub.io/packages/helm/fluxcd-community/flux2
2.16.4 -> 2.17.0

Expected behavior

Patching is working, but it will be overwritten

Current stored versions: ["v2beta1", "v2beta2", "v2"]

  • Remove: v2beta1
  • Keep: v2beta2, v2
kubectl patch crd helmreleases.helm.toolkit.fluxcd.io --type='merge' \
  -p='{"status":{"storedVersions":["v2","v2beta2"]}}'

Current stored versions: ["v1beta1", "v1beta2", "v1beta3"]

  • Remove: v1beta1
  • Keep: v1beta2, v1beta3
kubectl patch crd alerts.notification.toolkit.fluxcd.io --type='merge' \
  -p='{"status":{"storedVersions":["v1beta2","v1beta3"]}}'

Current stored versions: ["v1beta1", "v1beta2", "v1beta3"]

  • Remove: v1beta1
  • Keep: v1beta2, v1beta3
kubectl patch crd providers.notification.toolkit.fluxcd.io --type='merge' \
  -p='{"status":{"storedVersions":["v1beta2","v1beta3"]}}'

Current stored versions: ["v1beta1", "v1beta2", "v1"]

  • Remove: v1beta1
  • Keep: v1beta2, v1
kubectl patch crd receivers.notification.toolkit.fluxcd.io --type='merge' \
  -p='{"status":{"storedVersions":["v1beta2","v1"]}}'

Screenshots and recordings

No response

OS / Distro

Ubuntu Linux

Flux version

flux: v2.7.2

Flux check

checking prerequisites
✔ Kubernetes 1.33.3 >=1.32.0-0
► checking version in cluster
✔ distribution: flux-2.7.2
✔ bootstrapped: false
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v1.4.2
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.7.1
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.7.3
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.7.2
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1
✔ externalartifacts.source.toolkit.fluxcd.io/v1
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1
✔ helmreleases.helm.toolkit.fluxcd.io/v2
✔ helmrepositories.source.toolkit.fluxcd.io/v1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✔ all checks passed

Git provider

Gitlab

Container Registry provider

Azure Container Registry

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions