From db2e334269a173adc5a4bbd02db0e209d2d494f0 Mon Sep 17 00:00:00 2001 From: Yossi Boaron Date: Wed, 25 Oct 2023 15:56:53 +0300 Subject: [PATCH] Delete Calico IPPools when Submariner uninstalled All Calico IPPools created by Submariner should be deleted when Submariner is uninstalled. This PR updates Calico IPPools handler Uninstall function to delete all IPPools regardless of isGateway field status. Fixes: https://github.com/submariner-io/submariner/issues/2764 Signed-off-by: Yossi Boaron --- pkg/routeagent_driver/handlers/calico/ippool_handler.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/routeagent_driver/handlers/calico/ippool_handler.go b/pkg/routeagent_driver/handlers/calico/ippool_handler.go index 6f7ae9d77..573a71c9e 100644 --- a/pkg/routeagent_driver/handlers/calico/ippool_handler.go +++ b/pkg/routeagent_driver/handlers/calico/ippool_handler.go @@ -129,10 +129,6 @@ func (h *calicoIPPoolHandler) TransitionToGateway() error { } func (h *calicoIPPoolHandler) Uninstall() error { - if !h.isGateway.Load() { - return nil - } - logger.Info("Uninstalling Calico IPPools used for Submariner") labelSelector := labels.SelectorFromSet(map[string]string{submarinerIPPool: "true"}).String()