cmd: do not receive signal
Usually signal.Notify() is used for the main thread to wait for children
threads to complete for graceful shutdown. We aren't doing any of this.
This part of code was added as a way to print SIGTERM. Not needed anyway.
@@ -20,7 +20,6 @@ import (
"fmt"
"net/http"
"os"
- "os/signal"
"runtime"
"time"
@@ -80,13 +79,6 @@ func main() {
logrus.Fatalf("must set env (%s)", constants.EnvOperatorPodName)
}
- c := make(chan os.Signal, 1)
- signal.Notify(c)
- go func() {
- logrus.Infof("received signal: %v", <-c)
- os.Exit(1)
- }()
-
if printVersion {
fmt.Println("etcd-operator Version:", version.Version)
fmt.Println("Git SHA:", version.GitSHA)
