Skip to content

Commit

Permalink
Skip DHCP server deletion when PowerVS service instance is created by…
Browse files Browse the repository at this point in the history
… controller

Since PowerVS service instance deletion will take care of deleting the DHCP server as well
  • Loading branch information
dharaneeshvrd committed Jun 18, 2024
1 parent 7177bd3 commit 2b7a3fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloud/scope/powervs_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,10 @@ func (s *PowerVSClusterScope) DeleteDHCPServer() error {
s.Info("Skipping DHP server deletion as resource is not created by controller")
return nil
}
if s.isResourceCreatedByController(infrav1beta2.ResourceTypeServiceInstance) {
s.Info("Skipping DHCP server deletion as PowerVS service instance is created by controller, will directly delete the PowerVS service instance")
return nil
}

if s.IBMPowerVSCluster.Status.DHCPServer.ID == nil {
return nil
Expand Down

0 comments on commit 2b7a3fd

Please sign in to comment.