PodGCController waits for informer sync before doing anything.

This commit is contained in:
gmarek
2016-10-14 14:40:08 +02:00
parent f73afdc5c2
commit fd874ab173
2 changed files with 16 additions and 0 deletions

View File

@@ -112,6 +112,10 @@ func (gcc *PodGCController) Run(stop <-chan struct{}) {
}
func (gcc *PodGCController) gc() {
if !gcc.podController.HasSynced() || !gcc.nodeController.HasSynced() {
glog.V(2).Infof("PodGCController is waiting for informer sync...")
return
}
pods, err := gcc.podStore.List(labels.Everything())
if err != nil {
glog.Errorf("Error while listing all Pods: %v", err)