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
619 stars 58 forks source link

Annotation to control permanent error of HetznerBareMetalHost #1335

Closed janiskemper closed 1 month ago

janiskemper commented 3 months ago

/kind feature

Describe the solution you'd like There are multiple reasons why a HetznerBareMetalHost object has a "permanent error" set. This means that user intervention is required.

The current work flow for users that have taken action on the server so that it can be used again to delete the custom resource and to recreate it. This is no issue at all from the workflow. However, it is not very elegant to delete an object and to manually re-create it.

Therefore, we can use an annotation that is set on the HetznerBareMetalHost by the controller and that can be removed from the user to indicate that the reason for the permanent error is gone and that we again want to use and provision the server.

So instead of deleting the HetznerBareMetalHost, the user can just delete the annotation and the controller would take care of the rest.