Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The CRD upgrader cannot deal with API removals #70

Closed
sync-by-unito bot opened this issue Nov 27, 2024 · 0 comments · Fixed by #71
Closed

The CRD upgrader cannot deal with API removals #70

sync-by-unito bot opened this issue Nov 27, 2024 · 0 comments · Fixed by #71
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Nov 27, 2024

While upgrading the ui-playground dataplane to the latest version, the CRD upgrader failed with the following message:

2024/11/27 13:12:29 DEBU Updating CustomResourceDefinition name=missioncontrolclusters.missioncontrol.datastax.com
2024/11/27 13:12:30 ERRO Error upgrading CustomResourceDefinitions
  error=
  │ CustomResourceDefinition.apiextensions.k8s.io "missioncontrolclusters.missioncontrol.datastax.com" is invalid: status.storedVersions[0]: Invalid value: "v1beta1": must appear in spec.versions
  │ failed to update CRD missioncontrolclusters.missioncontrol.datastax.com
  │ github.com/k8ssandra/k8ssandra-client/pkg/helmutil.(*Upgrader).Upgrade
  │ \t/workspace/pkg/helmutil/crds.go:106
  │ github.com/k8ssandra/k8ssandra-client/cmd/kubectl-k8ssandra/helm.(*options).Run
  │ \t/workspace/cmd/kubectl-k8ssandra/helm/crds.go:140
  │ github.com/k8ssandra/k8ssandra-client/cmd/kubectl-k8ssandra/helm.NewUpgradeCmd.func2
  │ \t/workspace/cmd/kubectl-k8ssandra/helm/crds.go:64
  │ github.com/spf13/cobra.(*Command).execute
  │ \t/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983
  │ github.com/spf13/cobra.(*Command).ExecuteC
  │ \t/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115
  │ github.com/spf13/cobra.(*Command).Execute
  │ \t/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
  │ main.main
  │ \t/workspace/cmd/kubectl-k8ssandra/main.go:18
  │ runtime.main
  │ \t/usr/local/go/src/runtime/proc.go:271
  │ runtime.goexit
  │ \t/usr/local/go/src/runtime/asm_amd64.s:1695
Error: failed to update CRD missioncontrolclusters.missioncontrol.datastax.com: CustomResourceDefinition.apiextensions.k8s.io "missioncontrolclusters.missioncontrol.datastax.com" is invalid: status.storedVersions[0]: Invalid value: "v1beta1": must appear in spec.versions

The status of the crd/missioncontrolclusters.missioncontrol.datastax.com object indeed shows the presence of both v1beta1 and v1beta2 in its status as storedVersions:

status:
  acceptedNames:
    kind: MissionControlCluster
    listKind: MissionControlClusterList
    plural: missioncontrolclusters
    shortNames:
    - mccluster
    - mcclusters
    singular: missioncontrolcluster
  conditions:
  - lastTransitionTime: "2024-02-12T18:15:57Z"
    message: no conflicts found
    reason: NoConflicts
    status: "True"
    type: NamesAccepted
  - lastTransitionTime: "2024-02-12T18:16:02Z"
    message: the initial names have been accepted
    reason: InitialNamesAccepted
    status: "True"
    type: Established
  storedVersions:
  - v1beta1
  - v1beta2

We need to figure out how to perform the upgrade and remove traces of v1beta1 in the CRD status.

┆Issue is synchronized with this Jira Bug by Unito
┆Reviewer: Alexander Dejanovski
┆Issue Number: K8CL-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant