canonical / cluster-api-control-plane-provider-microk8s

This project offers a cluster API control plane controller that manages the control plane of a MicroK8s cluster. It is expected to be used along with the respective MicroK8s specific machine bootstrap provider.
https://microk8s.io
7 stars 5 forks source link

Prevent panicing when NodeRef is not set when deleting a machine #65

Closed HomayoonAlimohammadi closed 1 month ago

HomayoonAlimohammadi commented 2 months ago

Summary

This PR prevents a panic that might happen when we're deleting a cluster that has machines without an infra (e.g. when we're faced with faulty infra providers). The panic is due to getting the machine.Status.NodeRef.Name while there is not NodeRef to begin with. Also added a note for future readers.

ktsakalozos commented 1 month ago

LGTM +1 thank you @HomayoonAlimohammadi