1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +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:
Kubernetes Prow Robot 2024-07-25 01:22:14 -07:00 committed by GitHub
commit bd8d74d6f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,7 +161,15 @@ func newNfdController(config *restclient.Config, nfdApiControllerOptions nfdApiC
// Start informers // Start informers
informerFactory.Start(c.stopChan) 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 return c, nil
} }