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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user