File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed
Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
2121 "flag"
2222 "fmt"
2323 "os"
24- "strings"
2524
2625 apiv1alpha1 "github.com/red-hat-storage/ocs-client-operator/api/v1alpha1"
2726 "github.com/red-hat-storage/ocs-client-operator/internal/controller"
@@ -109,19 +108,6 @@ func main() {
109108
110109 ctrl .SetLogger (zap .New (zap .UseFlagOptions (& opts )))
111110
112- defaultNamespaces := map [string ]cache.Config {}
113- operatorNamespace := utils .GetOperatorNamespace ()
114- defaultNamespaces [operatorNamespace ] = cache.Config {}
115-
116- watchNamespace := utils .GetWatchNamespace ()
117- if watchNamespace == "" {
118- setupLog .Info ("No value for env WATCH_NAMESPACE is set. Manager will only watch for resources in the operator deployed namespace." )
119- } else {
120- for _ , namespace := range strings .Split (watchNamespace , "," ) {
121- defaultNamespaces [namespace ] = cache.Config {}
122- }
123- }
124-
125111 subscriptionwebhookSelector := fields .SelectorFromSet (fields.Set {"metadata.name" : templates .SubscriptionWebhookName })
126112 mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
127113 Scheme : scheme ,
@@ -136,7 +122,6 @@ func main() {
136122 Field : subscriptionwebhookSelector ,
137123 },
138124 },
139- DefaultNamespaces : defaultNamespaces ,
140125 },
141126 WebhookServer : webhook .NewServer (webhook.Options {
142127 Port : webhookPort ,
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ const (
3737 // which is the namespace where operator pod is deployed.
3838 OperatorNamespaceEnvVar = "OPERATOR_NAMESPACE"
3939
40- // WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE
41- // which indicates any other namespace to watch for resources.
42- WatchNamespaceEnvVar = "WATCH_NAMESPACE"
43-
4440 // OperatorPodNameEnvVar is the constant for env variable OPERATOR_POD_NAME
4541 OperatorPodNameEnvVar = "OPERATOR_POD_NAME"
4642
@@ -67,10 +63,6 @@ func GetOperatorNamespace() string {
6763 return os .Getenv (OperatorNamespaceEnvVar )
6864}
6965
70- func GetWatchNamespace () string {
71- return os .Getenv (WatchNamespaceEnvVar )
72- }
73-
7466func ValidateOperatorNamespace () error {
7567 ns := GetOperatorNamespace ()
7668 if ns == "" {
You can’t perform that action at this time.
0 commit comments