mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
Merge pull request #1809 from marquiz/devel/informer-cache-sync
nfd-master: check nfd api informer cache sync result
This commit is contained in:
commit
bd8d74d6f2
1 changed files with 9 additions and 1 deletions
|
@ -161,7 +161,15 @@ func newNfdController(config *restclient.Config, nfdApiControllerOptions nfdApiC
|
|||
|
||||
// Start informers
|
||||
informerFactory.Start(c.stopChan)
|
||||
informerFactory.WaitForCacheSync(c.stopChan)
|
||||
now := time.Now()
|
||||
ret := informerFactory.WaitForCacheSync(c.stopChan)
|
||||
for res, ok := range ret {
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("informer cache failed to sync resource %s", res)
|
||||
}
|
||||
}
|
||||
|
||||
klog.InfoS("informer caches synced", "duration", time.Since(now))
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue