make controller watching for changes in any namespaces

parent 6b7080c9
Pipeline #57881817 failed with stages
in 6 minutes and 32 seconds
......@@ -7,7 +7,6 @@ import (
"os"
"runtime"
"github.com/operator-framework/operator-sdk/pkg/k8sutil"
"github.com/operator-framework/operator-sdk/pkg/leader"
sdkVersion "github.com/operator-framework/operator-sdk/version"
"github.com/tsuru/nginx-operator/pkg/apis"
......@@ -38,11 +37,7 @@ func main() {
printVersion()
namespace, err := k8sutil.GetWatchNamespace()
if err != nil {
log.Error(err, "Failed to get watch namespace")
os.Exit(1)
}
log.Info("Watching all namespaces")
// Get a config to talk to the apiserver
cfg, err := config.GetConfig()
......@@ -59,7 +54,7 @@ func main() {
}
// Create a new Cmd to provide shared dependencies and start components
mgr, err := manager.New(cfg, manager.Options{Namespace: namespace})
mgr, err := manager.New(cfg, manager.Options{})
if err != nil {
log.Error(err, "")
os.Exit(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment