You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clean up status.storedVersions before removing CheCluster v1 from the CRD #24032
area/che-operatorIssues and PRs related to Eclipse Che Kubernetes Operatorkind/taskInternal things, technical debt, and to-do tasks to be performed.severity/P1Has a major impact to usage or development of the system.
Is your task related to a problem? Please describe
Follow-up from eclipse-che/che-operator#2278, which stops serving the deprecated org.eclipse.che/v1 CheCluster API (served: false, storage: false, v2 remains the storage version).
When v1 is eventually removed from the CRD spec.versions, any cluster that still lists v1 in status.storedVersions will reject the CRD update:
spec.versions[] in body must be of type string: "status.storedVersions"
The Kubernetes API server only allows removing a version from spec.versions after it no longer appears in status.storedVersions, i.e. after all stored objects have been re-written (or migrated) to the storage version.
Describe the solution you'd like
Before removing v1 from the CRD:
Add a storage-version migration / storedVersions cleanup step — e.g. a check or job that re-writes remaining v1-stored CheCluster objects as v2 and removes v1 from status.storedVersions (see the Kubernetes storage version migration docs).
Optionally, the operator could log/report a warning while v1 is present in status.storedVersions so administrators know a migration is pending.
Describe alternatives you've considered
Documenting a manual kubectl patch of status.storedVersions — not viable in general, since removing a version from storedVersions while objects are still stored as v1 would make them unreadable.
area/che-operatorIssues and PRs related to Eclipse Che Kubernetes Operatorkind/taskInternal things, technical debt, and to-do tasks to be performed.severity/P1Has a major impact to usage or development of the system.
Activity