Call fatalf if namespace to watch does not exist

This commit is contained in:
Sergey Dudoladov 2018-02-20 16:13:48 +01:00
parent c47abed6ba
commit 66a3b6830e
1 changed files with 1 additions and 2 deletions

View File

@ -261,8 +261,7 @@ func (c *Controller) getEffectiveNamespace(namespaceFromEnvironment, namespaceFr
} else { } else {
if _, err := c.KubeClient.Namespaces().Get(namespace, metav1.GetOptions{}); err != nil { if _, err := c.KubeClient.Namespaces().Get(namespace, metav1.GetOptions{}); err != nil {
// the namespace may be created manually at runtime c.logger.Fatalf("Could not find the watched namespace %q", namespace)
c.logger.Warnf("Could not find the watched namespace %q", namespace)
} else { } else {
c.logger.Infof("Listenting to the specific namespace %q", namespace) c.logger.Infof("Listenting to the specific namespace %q", namespace)
} }