diff --git a/pkg/controller/garbagecollector/graph_builder.go b/pkg/controller/garbagecollector/graph_builder.go index c19305312e9..b957677663a 100644 --- a/pkg/controller/garbagecollector/graph_builder.go +++ b/pkg/controller/garbagecollector/graph_builder.go @@ -342,6 +342,9 @@ func (gb *GraphBuilder) Run(stopCh <-chan struct{}) { close(monitor.stopCh) } } + + // reset monitors so that the graph builder can be safely re-run/synced. + gb.monitors = nil glog.Infof("stopped %d of %d monitors", stopped, len(monitors)) }