Skip to content

Commit

Permalink
Call fatalf if namespace to watch does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Dudoladov committed Feb 20, 2018
1 parent c47abed commit 66a3b68
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 66a3b68

Please sign in to comment.