Skip to content

Commit 66a3b68

Browse files
author
Sergey Dudoladov
committed
Call fatalf if namespace to watch does not exist
1 parent c47abed commit 66a3b68

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/controller/controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ func (c *Controller) getEffectiveNamespace(namespaceFromEnvironment, namespaceFr
261261
} else {
262262

263263
if _, err := c.KubeClient.Namespaces().Get(namespace, metav1.GetOptions{}); err != nil {
264-
// the namespace may be created manually at runtime
265-
c.logger.Warnf("Could not find the watched namespace %q", namespace)
264+
c.logger.Fatalf("Could not find the watched namespace %q", namespace)
266265
} else {
267266
c.logger.Infof("Listenting to the specific namespace %q", namespace)
268267
}

0 commit comments

Comments
 (0)