From 56598c5ded54c7c15f79c5214912961df8564298 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Tue, 30 Nov 2021 11:26:44 +0100 Subject: [PATCH] Delete DHCP server created for infrastructure purposes as well --- pkg/controller/infrastructure/actuator_delete.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/controller/infrastructure/actuator_delete.go b/pkg/controller/infrastructure/actuator_delete.go index e967c0dc..b4793c5f 100644 --- a/pkg/controller/infrastructure/actuator_delete.go +++ b/pkg/controller/infrastructure/actuator_delete.go @@ -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