From 66a3b6830e609ee9ec5852aedaaee6440d889ae6 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 20 Feb 2018 16:13:48 +0100 Subject: [PATCH] Call fatalf if namespace to watch does not exist --- pkg/controller/controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index b0738bba8..d19da5b84 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -261,8 +261,7 @@ func (c *Controller) getEffectiveNamespace(namespaceFromEnvironment, namespaceFr } else { if _, err := c.KubeClient.Namespaces().Get(namespace, metav1.GetOptions{}); err != nil { - // the namespace may be created manually at runtime - c.logger.Warnf("Could not find the watched namespace %q", namespace) + c.logger.Fatalf("Could not find the watched namespace %q", namespace) } else { c.logger.Infof("Listenting to the specific namespace %q", namespace) }