From 1a18bcdfaedfa366a8aa24a2bec84e959f764ba2 Mon Sep 17 00:00:00 2001 From: IbirbyZh <040796@gmail.com> Date: Mon, 10 Jun 2024 18:06:14 +0200 Subject: [PATCH] Fix the problem with starting the master with empty cache We faced the problem when master deleted some of labels on start. Sometimes he doesn't gets NodeFeatures when they are present in cluster because of empty cache in informer --- pkg/nfd-master/nfd-api-controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/nfd-master/nfd-api-controller.go b/pkg/nfd-master/nfd-api-controller.go index 055bf0154..18eacb241 100644 --- a/pkg/nfd-master/nfd-api-controller.go +++ b/pkg/nfd-master/nfd-api-controller.go @@ -161,6 +161,7 @@ func newNfdController(config *restclient.Config, nfdApiControllerOptions nfdApiC // Start informers informerFactory.Start(c.stopChan) + informerFactory.WaitForCacheSync(c.stopChan) return c, nil }