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

missing version field in status of k0smotronControlPlane #819

Open
cwrau opened this issue Nov 20, 2024 · 4 comments · Fixed by #826 · May be fixed by #865
Open

missing version field in status of k0smotronControlPlane #819

cwrau opened this issue Nov 20, 2024 · 4 comments · Fixed by #826 · May be fixed by #865
Assignees
Labels
bug Something isn't working

Comments

@cwrau
Copy link
Contributor

cwrau commented Nov 20, 2024

What happened?

Cluster API expects the controlPlane to have a version field inside its status field, see https://github.com/kubernetes-sigs/cluster-api/blob/b30d12b227f549d2bb8dccc86a8a7bf4a0b215f9/internal/contract/controlplane.go#L158 and https://github.com/kubernetes-sigs/cluster-api/blob/b30d12b227f549d2bb8dccc86a8a7bf4a0b215f9/internal/contract/controlplane.go#L64

otherwise it won't allow upgrading

Involved Areas

Cluster API integration

What did you expect to happen?

That the field exists I guess 😅

Steps to reproduce

create a ClusterClass cluster

k0smotron version

1.2.0

k0s version

N/A and I don't know

Anything else we need to know?

No response

@cwrau cwrau added the bug Something isn't working label Nov 20, 2024
@cwrau
Copy link
Contributor Author

cwrau commented Nov 26, 2024

Thanks for the quick fix, but seeing the PR I think the implementation is not entirely correct. Cluster-API expects the current version to be in this field, not the version from the spec.

@apedriza
Copy link
Contributor

Thanks for the quick fix, but seeing the PR I think the implementation is not entirely correct. Cluster-API expects the current version to be in this field, not the version from the spec.

I will reopen this issue to revisit it. For more context -> https://cluster-api.sigs.k8s.io/developer/providers/control-plane#:~:text=version%20%2D%20is%20a%20string%20representing%20the%20minimum,Kubernetes%20version%20skew%20policies%20in%20managed%20topologies. Thank you!

@apedriza apedriza reopened this Nov 26, 2024
@cwrau
Copy link
Contributor Author

cwrau commented Nov 26, 2024

Thanks for the quick fix, but seeing the PR I think the implementation is not entirely correct. Cluster-API expects the current version to be in this field, not the version from the spec.

I will reopen this issue to revisit it. For more context -> cluster-api.sigs.k8s.io/developer/providers/control-plane#:~:text=version - is a string representing the minimum,Kubernetes version skew policies in managed topologies. Thank you!

Ah, nice! I didn't search enough to find this specific doc 😅

@cwrau
Copy link
Contributor Author

cwrau commented Nov 28, 2024

Btw, I manually edited the CRD to add these fields and found more missing fields; https://github.com/kubernetes-sigs/cluster-api/blob/b30d12b227f549d2bb8dccc86a8a7bf4a0b215f9/internal/contract/controlplane.go

Specifically, every field needed for Is* functions are missing. At least as far as I could see it.

Setting

status:
  readyReplicas: 3
  replicas: 3
  unavailableReplicas: 0
  updatedReplicas: 3
  version: v1.29.1

allowed the ControlPlane to proceed

@apedriza apedriza self-assigned this Dec 19, 2024
@apedriza apedriza linked a pull request Dec 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants