fix logging calls (#3260)
This commit is contained in:
parent
0e2ac454cb
commit
9d227ab62d
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO (antoineco): compare with error types from k8s.io/apimachinery/pkg/api/errors
|
// TODO (antoineco): compare with error types from k8s.io/apimachinery/pkg/api/errors
|
||||||
if strings.Contains(err.Error(), "cannot get services in the namespace") {
|
if strings.Contains(err.Error(), "cannot get services in the namespace") {
|
||||||
glog.Fatalf("✖ The cluster seems to be running with a restrictive Authorization mode and the Ingress controller does not have the required permissions to operate normally.")
|
glog.Fatal("✖ The cluster seems to be running with a restrictive Authorization mode and the Ingress controller does not have the required permissions to operate normally.")
|
||||||
}
|
}
|
||||||
glog.Fatalf("No service with name %v found: %v", conf.DefaultService, err)
|
glog.Fatalf("No service with name %v found: %v", conf.DefaultService, err)
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ func handleSigterm(ngx *controller.NGINXController, exit exiter) {
|
||||||
signalChan := make(chan os.Signal, 1)
|
signalChan := make(chan os.Signal, 1)
|
||||||
signal.Notify(signalChan, syscall.SIGTERM)
|
signal.Notify(signalChan, syscall.SIGTERM)
|
||||||
<-signalChan
|
<-signalChan
|
||||||
glog.Infof("Received SIGTERM, shutting down")
|
glog.Info("Received SIGTERM, shutting down")
|
||||||
|
|
||||||
exitCode := 0
|
exitCode := 0
|
||||||
if err := ngx.Stop(); err != nil {
|
if err := ngx.Stop(); err != nil {
|
||||||
|
@ -168,7 +168,7 @@ func handleSigterm(ngx *controller.NGINXController, exit exiter) {
|
||||||
exitCode = 1
|
exitCode = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.Infof("Handled quit, awaiting Pod deletion")
|
glog.Info("Handled quit, awaiting Pod deletion")
|
||||||
time.Sleep(10 * time.Second)
|
time.Sleep(10 * time.Second)
|
||||||
|
|
||||||
glog.Infof("Exiting with %v", exitCode)
|
glog.Infof("Exiting with %v", exitCode)
|
||||||
|
|
Loading…
Reference in a new issue