cluster-api-provider-hetzner
cluster-api-provider-hetzner copied to clipboard
Condition for missing `rootDeviceHints` of `HetznerBareMetalHost`
/kind feature
Describe the solution you'd like
The user has to specify rootDeviceHints
of HetznerBareMetalHosts
. Currently, no condition shows the user that rootDeviceHints
are still missing.
I propose to add a condition that shows whether rootDeviceHints are existing (and valid) or not. This condition can be set on true or false independent of the provisioning of a machine. It is maybe necessary to distinguish rootDeviceHints
that are set from those that are validated, because if the controller hasn't gotten the information about the storage devices from the machine yet, then the rootDeviceHints
cannot be validated yet.
there is a condition already, also similar to what is mentioned here, and it is set during the provisioning process: https://github.com/syself/cluster-api-provider-hetzner/blob/cd03c29115d2981ece23a6832654d2238c69f0f3/pkg/services/baremetal/host/host.go#L627
What we need additionally, is a condition that shows for a host that is not yet provisioned that this is missing. the message should give information about the fact that users can still wait for the provisioning process to get information about the storage devices, or use ssh and check it manually.
The condition should be set in hetznerbaremetalhost-controller.go before we do reconcileSelectedStates
@janiskemper I would love to work on this issue
sure @sarthaksarthak9, you can try! I won't be able to support much though. Do you have access to Hetzner bare metal servers? Otherwise it'll be difficult
@janiskemper I don't have access to Hetzner bare metal servers and understand it might be difficult without it, I'll focus on other issues for now.
@sarthaksarthak9 you don't need real machines for that. We have tests and mocks. We use envTest for that.