File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package kubernetes
1818
1919import (
2020 "context"
21+ "fmt"
2122 "sync"
2223 "time"
2324
@@ -316,5 +317,16 @@ func (im *InformerManager) Listen() (stopCh <-chan struct{}) {
316317 }
317318
318319 }
320+
321+ go im .snapshotInformerFactory .Start (im .stopCh )
322+ cacheSync := im .snapshotInformerFactory .WaitForCacheSync (im .stopCh )
323+ // TODO: remove
324+ fmt .Print (cacheSync )
325+ for _ , isSynced := range cacheSync {
326+ if ! isSynced {
327+ return
328+ }
329+ }
330+
319331 return im .stopCh
320332}
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ type InformerManager struct {
5656 snapshotInformerFactory externalversions.SharedInformerFactory
5757
5858 // main signal
59- stopCh ( <- chan struct {})
59+ stopCh <- chan struct {}
6060
6161 // node informer
6262 nodeInformer cache.SharedInformer
You can’t perform that action at this time.
0 commit comments