File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,14 @@ func main() {
7575 pflag .CommandLine .AddGoFlagSet (flag .CommandLine )
7676 pflag .Parse ()
7777
78- if watchNamespace != "" {
78+ ctrl .SetLogger (textlogger .NewLogger (textlogger .NewConfig ()))
79+
80+ if watchNamespace == "" {
81+ setupLog .Info ("No namespace specified, watching all namespaces" )
82+ } else {
7983 setupLog .Info ("Watching cluster-api objects only in namespace for reconciliation" , "namespace" , watchNamespace )
8084 }
8185
82- ctrl .SetLogger (textlogger .NewLogger (textlogger .NewConfig ()))
83-
8486 mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
8587 Scheme : scheme ,
8688 Metrics : metricsserver.Options {
@@ -90,6 +92,9 @@ func main() {
9092 LeaderElectionID : "controller-leader-election-capmaas" ,
9193 Cache : cache.Options {
9294 SyncPeriod : & syncPeriod ,
95+ DefaultNamespaces : map [string ]cache.Config {
96+ watchNamespace : {},
97+ },
9398 },
9499 HealthProbeBindAddress : healthAddr ,
95100 WebhookServer : webhookserver .NewServer (webhookserver.Options {
You can’t perform that action at this time.
0 commit comments