diff --git a/internal/controllers/manager.go b/internal/controllers/manager.go index 12cc6174..862ddc0e 100644 --- a/internal/controllers/manager.go +++ b/internal/controllers/manager.go @@ -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" @@ -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)