Skip to content

Commit

Permalink
fix(cache): remove multicachenamespace (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan-pad authored Jul 12, 2023
1 parent 6d26a5a commit 0f6125c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/controllers/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/healthz"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -76,7 +75,10 @@ func (c *Controllers) Exec() {
HealthProbeBindAddress: c.config.Controller.HealthProbeBindAddress,
LeaderElection: c.config.Controller.LeaderElection.Enabled,
LeaderElectionID: c.config.Controller.LeaderElection.ID,
NewCache: cache.MultiNamespacedCacheBuilder(c.config.Controller.WatchedNamespaces),
// NewCache: func(config *rest.Config, cacheOpts cache.Options) (cache.Cache, error) {
// cacheOpts.Namespaces = c.config.Controller.WatchedNamespaces
// return cache.New(config, cacheOpts)
// }})
})
if err != nil {
log.Fatalf("unable to start manager: %s", err)
Expand Down

0 comments on commit 0f6125c

Please sign in to comment.