@@ -19,7 +19,6 @@ package main
1919import (
2020 "flag"
2121 "os"
22- "strings"
2322
2423 apiv1alpha1 "github.com/red-hat-storage/ocs-client-operator/api/v1alpha1"
2524 "github.com/red-hat-storage/ocs-client-operator/internal/controller"
@@ -101,20 +100,6 @@ func main() {
101100 ctrl .SetLogger (zap .New (zap .UseFlagOptions (& opts )))
102101
103102 storageclustersSelector := fields .SelectorFromSet (fields.Set {"metadata.name" : "storageclusters.ocs.openshift.io" })
104-
105- defaultNamespaces := map [string ]cache.Config {}
106- operatorNamespace := utils .GetOperatorNamespace ()
107- defaultNamespaces [operatorNamespace ] = cache.Config {}
108-
109- watchNamespace := utils .GetWatchNamespace ()
110- if watchNamespace == "" {
111- setupLog .Info ("No value for env WATCH_NAMESPACE is set. Manager will only watch for resources in the operator deployed namespace." )
112- } else {
113- for _ , namespace := range strings .Split (watchNamespace , "," ) {
114- defaultNamespaces [namespace ] = cache.Config {}
115- }
116- }
117-
118103 subscriptionwebhookSelector := fields .SelectorFromSet (fields.Set {"metadata.name" : templates .SubscriptionWebhookName })
119104 mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
120105 Scheme : scheme ,
@@ -133,7 +118,6 @@ func main() {
133118 Field : subscriptionwebhookSelector ,
134119 },
135120 },
136- DefaultNamespaces : defaultNamespaces ,
137121 },
138122 WebhookServer : webhook .NewServer (webhook.Options {
139123 Port : webhookPort ,
0 commit comments