From bd87d70de167fa0eb4ed922a1cccb87b70577017 Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Mon, 9 Aug 2021 16:29:49 +0530 Subject: [PATCH] Revert "Fix:CIS not deleting old f5ipam cr which is not in use (#1920)" (#1945) This reverts commit ad18d8b70558cc2297c2dbc37722308127b76352. --- pkg/crmanager/crManager.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg/crmanager/crManager.go b/pkg/crmanager/crManager.go index 5af542a80..8dce5871a 100644 --- a/pkg/crmanager/crManager.go +++ b/pkg/crmanager/crManager.go @@ -229,17 +229,6 @@ func (crMgr *CRManager) createIPAMResource() error { } crMgr.ipamCR = IPAMNamespace + "/" + crName - //Get all IPAMS - ipams, err := crMgr.ipamCli.List(IPAMNamespace) - if err == nil { - for _, ipam := range ipams { - err = crMgr.ipamCli.Delete(ipam.Namespace, ipam.Name, metaV1.DeleteOptions{}) - if err != nil { - log.Debugf("[ipam] Delete failed. Error: %s", err.Error()) - } - } - } - ipamCR, err := crMgr.ipamCli.Create(f5ipam) if err == nil { log.Debugf("[ipam] Created IPAM Custom Resource: \n%v\n", ipamCR)