Call fatalf if namespace to watch does not exist
This commit is contained in:
parent
c47abed6ba
commit
66a3b6830e
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue