Skip to content

Commit 97c91af

Browse files
🌱 Remove reboot annotation and condition on deprovisioning (#2022)
remove reboot annotation and condition on deprovisioning Signed-off-by: Dhairya Arora <dhairya.arora@syself.com>
1 parent b0e73a5 commit 97c91af

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/services/baremetal/host/host.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,12 @@ func (s *Service) actionProvisioned(ctx context.Context) actionResult {
22592259

22602260
// next: None
22612261
func (s *Service) actionDeprovisioning(ctx context.Context) actionResult {
2262+
// remove the reboot annotation if present.
2263+
s.scope.HetznerBareMetalHost.ClearRebootAnnotations()
2264+
2265+
// remove the RebootSucceeded condition if present.
2266+
v1beta1conditions.Delete(s.scope.HetznerBareMetalHost, infrav1.RebootSucceededCondition)
2267+
22622268
// Update server name via RobotAPI, strip "bm-" from the desired hostname.
22632269
// Example: If the hostname is "bm-abc-1-2356799" it should be renamed to "abc-1-2356799".
22642270
if _, err := s.scope.RobotClient.SetBMServerName(

0 commit comments

Comments
 (0)