From 96fb080572588a4a9b19394dcd4b567e71a59a48 Mon Sep 17 00:00:00 2001 From: Vincent Gramer Date: Tue, 1 Mar 2022 11:22:48 +0100 Subject: [PATCH] remove function util.IsCacheNotStarted since controller-runtime v0.8.1, manager start all caches before other Runnables so this function is not need anymore cf https://github.com/kubernetes-sigs/controller-runtime/pull/1327 Signed-off-by: Vincent Gramer --- pkg/controller/util/util.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/controller/util/util.go b/pkg/controller/util/util.go index 0e5c7f62e2d..29da6b9d0c8 100644 --- a/pkg/controller/util/util.go +++ b/pkg/controller/util/util.go @@ -18,7 +18,6 @@ package util import ( "context" - "errors" "fmt" kubermaticv1 "k8c.io/kubermatic/v2/pkg/apis/kubermatic/v1" @@ -28,7 +27,6 @@ import ( "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/util/workqueue" - "sigs.k8s.io/controller-runtime/pkg/cache" ctrlruntimeclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/handler" @@ -186,9 +184,3 @@ func ConcurrencyLimitReached(ctx context.Context, client ctrlruntimeclient.Clien return clustersUpdatingInProgressCount >= limit, nil } - -// IsCacheNotStarted returns true if the given error is not nil and an instance of -// cache.ErrCacheNotStarted. -func IsCacheNotStarted(err error) bool { - return errors.Is(err, &cache.ErrCacheNotStarted{}) -}