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

Check k3s-serving secret to determine controlPlane.Status.Initialized #113

Merged

Conversation

anmazzotti
Copy link
Contributor

This should fix a deadlock scenario with the controlPlane.Status.Initialized when the CloudController module is disabled and cloud-provider=external is set as kubelet arg.
In this case k3s will not set Nodes.Spec.ProviderID, which is the expected behavior.
The CAPI Infrastructure provider should set the ProviderID, but in order to set it, the controlPlane.Status.Initialized needs to be true first.

For reference, this is a mirror implementation from the RKE2 provider: rancher/cluster-api-provider-rke2#302

@anmazzotti anmazzotti force-pushed the implement_control_plane_initialized branch from 071f5ce to 76fdec5 Compare May 14, 2024 07:33
@mogliang
Copy link
Collaborator

Would you mind add some background for this k3s-serving? I'm not very familar with this.
Btw, would you please add unit test as well?

@anmazzotti anmazzotti force-pushed the implement_control_plane_initialized branch from 76fdec5 to d7c4ba2 Compare May 15, 2024 09:47
@anmazzotti
Copy link
Contributor Author

@mogliang I added a little comment to elaborate on this secret we fetch and why.
Also added a bit of unit-testing on the ClusterStatus.

@mogliang mogliang merged commit 59643a0 into k3s-io:main May 16, 2024
5 checks passed
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 this pull request may close these issues.

2 participants