1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Fix node lister by allowing its reflector to have enough time so that listing works.

Currently time duration is chosen randomly.
This commit is contained in:
Avesh Agarwal
2017-11-08 15:44:38 -05:00
parent 582bd67681
commit 5db49f2ce1

View File

@@ -83,6 +83,9 @@ func GetNodeLister(client clientset.Interface, stopChannel <-chan struct{}) core
reflector := cache.NewReflector(listWatcher, &v1.Node{}, store, time.Hour)
reflector.RunUntil(stopChannel)
// To give some time so that listing works, chosen randomly
time.Sleep(100 * time.Millisecond)
return nodeLister
}