Skip to content

Commit c795492

Browse files
committed
Skipping DHCP server deletion when PowerVS service instance is created by controller
Since PowerVS service instance deletion will take care of deleting the DHCP server as well
1 parent 2489b05 commit c795492

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cloud/scope/powervs_cluster.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,6 +2498,10 @@ func (s *PowerVSClusterScope) DeleteDHCPServer() error {
24982498
s.Info("Skipping DHP server deletion as resource is not created by controller")
24992499
return nil
25002500
}
2501+
if s.isResourceCreatedByController(infrav1beta2.ResourceTypeServiceInstance) {
2502+
s.Info("Skipping DHCP server deletion as PowerVS service instance is created by controller, will directly delete the PowerVS service instance")
2503+
return nil
2504+
}
25012505

25022506
if s.IBMPowerVSCluster.Status.DHCPServer.ID == nil {
25032507
return nil

0 commit comments

Comments
 (0)