Skip to content

Commit

Permalink
Delete DHCP server created for infrastructure purposes as well
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTheEvilOne committed Nov 30, 2021
1 parent e46a899 commit 56598c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/infrastructure/actuator_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func (a *actuator) delete(ctx context.Context, infra *extensionsv1alpha1.Infrast
infraStatus, _ := transcoder.DecodeInfrastructureStatusFromInfrastructure(infra)

if nil != infraStatus {
err = ensurer.EnsureDHCPServerDeleted(ctx, client, infraStatus.DatacenterID, infraStatus.DHCPServerConfiguration.ServerID)
if err != nil {
return err
}

err = ensurer.EnsureNetworksDeleted(ctx, client, infraStatus.DatacenterID, infraStatus.NetworkIDs)
if err != nil {
return err
Expand Down

0 comments on commit 56598c5

Please sign in to comment.