Cluster API Provider Hetzner :rocket: The best way to manage Kubernetes clusters on Hetzner, fully declarative, Kubernetes-native and with self-healing capabilities
What this PR does / why we need it:
Currently, we set the providerID of a baremetal server only after we confirmed that cloud init has successfully completed. However, CAPI also reacts on the result of cloud init, so there might be a temporary state when CAPI already reconciles the node object, CSRs are created, etc., but we have not yet set the providerID.
This leads for example to errors in the csr-controller, where we rely on the providerID to be set.
This PR sets the providerID already in ensure-provisioned state, so that these temporary errors should not occur anymore.
What this PR does / why we need it: Currently, we set the providerID of a baremetal server only after we confirmed that cloud init has successfully completed. However, CAPI also reacts on the result of cloud init, so there might be a temporary state when CAPI already reconciles the node object, CSRs are created, etc., but we have not yet set the providerID.
This leads for example to errors in the csr-controller, where we rely on the providerID to be set.
This PR sets the providerID already in ensure-provisioned state, so that these temporary errors should not occur anymore.
I think we will prefer this approach: https://github.com/syself/cluster-api-provider-hetzner/pull/1357
TODOs: