From ec7de38f9b8d6541291cd8cbbb9034ad756c9ae5 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Fri, 16 Feb 2018 14:22:38 +0100 Subject: [PATCH] Make operator watch its own namespace instead of controller's one --- pkg/controller/controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 3b63b068b..ac58db342 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -105,8 +105,8 @@ func (c *Controller) initOperatorConfig() { } if configMapData["watched_namespace"] == "" { - c.logger.Infof("No namespace to watch specified. By convention, the operator falls back to watching the namespace it is deployed to: '%v' \n", c.config.Namespace) - configMapData["watched_namespace"] = c.config.Namespace + c.logger.Infof("No namespace to watch specified. By convention, the operator falls back to watching the namespace it is deployed to: '%v' \n", spec.GetOperatorNamespace()) + configMapData["watched_namespace"] = spec.GetOperatorNamespace() } if c.config.NoDatabaseAccess {