diff --git a/pkg/controllers/routing/network_routes_controller.go b/pkg/controllers/routing/network_routes_controller.go index 9bb69a67..77a92f0c 100644 --- a/pkg/controllers/routing/network_routes_controller.go +++ b/pkg/controllers/routing/network_routes_controller.go @@ -659,6 +659,7 @@ func (nrc *NetworkRoutingController) injectRoute(path *gobgpapi.Path) error { } else { // knowing that a tunnel shouldn't exist for this route, check to see if there are any lingering tunnels / // routes that need to be cleaned up. + nrc.routeSyncer.DelInjectedRoute(dst) tunnels.CleanupTunnel(dst, tunnelName) } @@ -700,6 +701,7 @@ func (nrc *NetworkRoutingController) injectRoute(path *gobgpapi.Path) error { } default: // otherwise, let BGP do its thing, nothing to do here + nrc.routeSyncer.DelInjectedRoute(dst) return nil }