Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
fix: log.Fatal will call os.Exit, use log.Println instead (#8492)
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly authored Aug 9, 2022
1 parent 077a12e commit 981cdc0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ package main
import (
"context"
"fmt"
"log"
"net/url"
"os"
"os/signal"
"sync"
"syscall"

"github.com/keptn/keptn/helm-service/controller"
"github.com/keptn/keptn/helm-service/pkg/common"
"github.com/keptn/keptn/helm-service/pkg/configurationchanger"
"github.com/keptn/keptn/helm-service/pkg/helm"

"net/url"
"os/signal"
"sync"
"syscall"

logger "github.com/sirupsen/logrus"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"log"
"os"

"github.com/keptn/go-utils/pkg/common/kubeutils"

"github.com/keptn/keptn/helm-service/pkg/namespacemanager"
Expand Down Expand Up @@ -231,7 +229,7 @@ func getGracefulContext() context.Context {
ctx, cancel := context.WithCancel(cloudevents.WithEncodingStructured(context.WithValue(context.Background(), controller.GracefulShutdownKey, wg)))
go func() {
<-ch
log.Fatal("Container termination triggered, starting graceful shutdown")
log.Println("Container termination triggered, starting graceful shutdown")
wg.Wait()
cancel()
}()
Expand Down

0 comments on commit 981cdc0

Please sign in to comment.