Skip to content

Commit

Permalink
remove function util.IsCacheNotStarted
Browse files Browse the repository at this point in the history
since controller-runtime v0.8.1, manager start all caches before other Runnables so this function is not need anymore cf kubernetes-sigs/controller-runtime#1327

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
  • Loading branch information
vgramer committed Mar 1, 2022
1 parent efcd9ae commit 96fb080
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pkg/controller/util/util.go
Expand Up @@ -18,7 +18,6 @@ package util

import (
"context"
"errors"
"fmt"

kubermaticv1 "k8c.io/kubermatic/v2/pkg/apis/kubermatic/v1"
Expand All @@ -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"
Expand Down Expand Up @@ -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{})
}

0 comments on commit 96fb080

Please sign in to comment.