Skip to content

Commit

Permalink
Log namespace restriction if one exists
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Mar 8, 2019
1 parent 6ba69dc commit 780ba82
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/flagger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ func main() {
logger.Fatalf("Error building example clientset: %s", err.Error())
}

if namespace == "" {
logger.Infof("Flagger Canary's Watcher is on all namespace")
} else {
logger.Infof("Flagger Canary's Watcher is on namespace %s", namespace)
}

flaggerInformerFactory := informers.NewSharedInformerFactoryWithOptions(flaggerClient, time.Second*30, informers.WithNamespace(namespace))

canaryInformer := flaggerInformerFactory.Flagger().V1alpha3().Canaries()
Expand All @@ -105,6 +99,9 @@ func main() {
}

logger.Infof("Connected to Kubernetes API %s", ver)
if namespace != "" {
logger.Infof("Watching namespace %s", namespace)
}

ok, err := controller.CheckMetricsServer(metricsServer)
if ok {
Expand Down

0 comments on commit 780ba82

Please sign in to comment.