diff --git a/cmd/wordpress-operator/main.go b/cmd/wordpress-operator/main.go index d877c84d..b06fc3b3 100644 --- a/cmd/wordpress-operator/main.go +++ b/cmd/wordpress-operator/main.go @@ -62,8 +62,8 @@ func main() { HealthProbeBindAddress: options.HealthProbeBindAddress, } - if options.ScopedNamespace != "" { - opt.Namespace = options.ScopedNamespace + if options.WatchNamespace != "" { + opt.Namespace = options.WatchNamespace } // Create a new Cmd to provide shared dependencies and start components diff --git a/pkg/cmd/options/options.go b/pkg/cmd/options/options.go index 0abd7e57..6f11ef31 100644 --- a/pkg/cmd/options/options.go +++ b/pkg/cmd/options/options.go @@ -52,7 +52,8 @@ var ( // HealthProbeBindAddress is the TCP address that the controller should bind to for serving health probes. HealthProbeBindAddress = ":8081" - ScopedNamespace = os.Getenv("SCOPED_NAMESPACE") + // WatchNamespace sets the Namespace field, which restricts the manager's cache to watch objects in the desired namespace. + WatchNamespace = os.Getenv("WATCH_NAMESPACE") ) func namespace() string {