Closed anmazzotti closed 6 months ago
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?
@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.
This should fix a deadlock scenario with the
controlPlane.Status.Initialized
when theCloudController
module is disabled andcloud-provider=external
is set as kubelet arg. In this case k3s will not setNodes.Spec.ProviderID
, which is the expected behavior. The CAPI Infrastructure provider should set the ProviderID, but in order to set it, thecontrolPlane.Status.Initialized
needs to be true first.For reference, this is a mirror implementation from the RKE2 provider: https://github.com/rancher-sandbox/cluster-api-provider-rke2/pull/302