From 12f0997193edbad314de3e7396941a79fc45dd86 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Tue, 15 Sep 2020 13:52:08 -0500 Subject: [PATCH] Wait for informers to sync before we pass readiness check. Signed-off-by: Matt Moyer --- internal/controllermanager/prepare_controllers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/controllermanager/prepare_controllers.go b/internal/controllermanager/prepare_controllers.go index fc821886..282d17ba 100644 --- a/internal/controllermanager/prepare_controllers.go +++ b/internal/controllermanager/prepare_controllers.go @@ -133,6 +133,10 @@ func PrepareControllers( installationNamespaceK8sInformers.Start(ctx.Done()) installationNamespacePinnipedInformers.Start(ctx.Done()) + kubePublicNamespaceK8sInformers.WaitForCacheSync(ctx.Done()) + installationNamespaceK8sInformers.WaitForCacheSync(ctx.Done()) + installationNamespacePinnipedInformers.WaitForCacheSync(ctx.Done()) + go controllerManager.Start(ctx) }, nil }