syself / cluster-api-provider-hetzner

Cluster API Provider Hetzner :rocket: The best way to manage Kubernetes clusters on Hetzner, fully declarative, Kubernetes-native and with self-healing capabilities
https://caph.syself.com
Apache License 2.0
589 stars 57 forks source link

Condition for missing `rootDeviceHints` of `HetznerBareMetalHost` #1174

Open janiskemper opened 6 months ago

janiskemper commented 6 months ago

/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.

janiskemper commented 2 months ago

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

sarthaksarthak9 commented 1 month ago

@janiskemper I would love to work on this issue

janiskemper commented 1 month ago

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

sarthaksarthak9 commented 1 month ago

@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.

guettli commented 1 week ago

@sarthaksarthak9 you don't need real machines for that. We have tests and mocks. We use envTest for that.