@@ -31,10 +31,10 @@ import (
3131
3232 "github.com/Azure/application-gateway-kubernetes-ingress/pkg/annotations"
3333 "github.com/Azure/application-gateway-kubernetes-ingress/pkg/appgw"
34- "github.com/Azure/application-gateway-kubernetes-ingress/pkg/crd_client/agic_crd_client/clientset/versioned"
3534 "github.com/Azure/application-gateway-kubernetes-ingress/pkg/controller"
36- "github.com/Azure/application-gateway-kubernetes-ingress/pkg/environment "
35+ "github.com/Azure/application-gateway-kubernetes-ingress/pkg/crd_client/agic_crd_client/clientset/versioned "
3736 istio "github.com/Azure/application-gateway-kubernetes-ingress/pkg/crd_client/istio_crd_client/clientset/versioned"
37+ "github.com/Azure/application-gateway-kubernetes-ingress/pkg/environment"
3838 "github.com/Azure/application-gateway-kubernetes-ingress/pkg/k8scontext"
3939 "github.com/Azure/application-gateway-kubernetes-ingress/pkg/version"
4040)
@@ -105,7 +105,11 @@ func main() {
105105 kubeClient := kubernetes .NewForConfigOrDie (apiConfig )
106106 namespaces := getNamespacesToWatch (env .WatchNamespace )
107107 validateNamespaces (namespaces , kubeClient ) // side-effect: will panic on non-existent namespace
108- glog .Info ("Ingress Controller will observe the following namespaces:" , strings .Join (namespaces , "," ))
108+ if len (namespaces ) == 0 {
109+ glog .Info ("Ingress Controller will observe all namespaces." )
110+ } else {
111+ glog .Info ("Ingress Controller will observe the following namespaces:" , strings .Join (namespaces , "," ))
112+ }
109113 crdClient := versioned .NewForConfigOrDie (apiConfig )
110114 istioCrdClient := istio .NewForConfigOrDie (apiConfig )
111115 k8sContext := k8scontext .NewContext (kubeClient , crdClient , istioCrdClient , namespaces , * resyncPeriod )
@@ -137,7 +141,7 @@ func validateNamespaces(namespaces []string, kubeClient *kubernetes.Clientset) {
137141func getNamespacesToWatch (namespaceEnvVar string ) []string {
138142
139143 // Returning an empty array effectively switches Ingress Controller
140- // in a mode of observing all acessible namespaces.
144+ // in a mode of observing all accessible namespaces.
141145 if namespaceEnvVar == "" {
142146 return []string {}
143147 }
0 commit comments