From 86807d21ba8bbebf172790ca082e5baf9da35849 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Thu, 8 Feb 2018 14:24:47 +0100 Subject: [PATCH] Kill operator if the namespace to watch does not exist --- pkg/controller/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 944033143..0b500315f 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -148,7 +148,7 @@ func (c *Controller) initController() { if c.opConfig.WatchedNamespace != v1.NamespaceAll { _, err := c.KubeClient.Namespaces().Get(c.opConfig.WatchedNamespace, metav1.GetOptions{}) if err != nil { - c.logger.Warnf("Operator was told to watch the %q namespace but was unable to confirm it existense via Kubernetes API. Falling back to watching all namespaces instead (done automatically by k8s)", c.opConfig.WatchedNamespace) + c.logger.Fatalf("Operator was told to watch the %q namespace but was unable to find it via Kubernetes API.", c.opConfig.WatchedNamespace) } }