diff --git a/main.go b/main.go index 203e196d3..3c9181eba 100644 --- a/main.go +++ b/main.go @@ -247,6 +247,11 @@ func main() { }() <-stopCh + + if err := cableEngine.Cleanup(); err != nil { + klog.Errorf("error cleaning up cableEngine resources before removing Gateway") + } + klog.Info("All controllers stopped or exited. Stopping main loop") if err := httpServer.Shutdown(context.TODO()); err != nil {