From 6ba428426b8479bd02e3b66e2051b8188c8d99f6 Mon Sep 17 00:00:00 2001 From: Yi Rae Kim Date: Mon, 8 May 2023 13:47:14 -0400 Subject: [PATCH] Bug: crash-looping config-policy-controller-uninstaller Signed-off-by: Yi Rae Kim --- controllers/configurationpolicy_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/configurationpolicy_controller.go b/controllers/configurationpolicy_controller.go index cb4d509b..baeb4755 100644 --- a/controllers/configurationpolicy_controller.go +++ b/controllers/configurationpolicy_controller.go @@ -219,7 +219,7 @@ func (r *ConfigurationPolicyReconciler) PeriodicallyExecConfigPolicies( policyQueue := make(chan *policyv1.ConfigurationPolicy, len(policiesList.Items)) var wg sync.WaitGroup - if !skipLoop { + if !skipLoop || cleanupImmediately { log.Info("Processing the policies", "count", len(policiesList.Items)) // Initialize the related object map