Skip to content

Commit

Permalink
Add architecture and k8s version to logs (#2403)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored Feb 1, 2022
1 parent 656e0d4 commit 1e38b54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/nginx-ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"os/signal"
"regexp"
"runtime"
"strings"
"syscall"
"time"
Expand Down Expand Up @@ -195,7 +196,7 @@ func main() {
glog.Fatalf("Error setting logtostderr to true: %v", err)
}

versionInfo := fmt.Sprintf("Version=%v GitCommit=%v Date=%v", version, commit, date)
versionInfo := fmt.Sprintf("Version=%v GitCommit=%v Date=%v Arch=%v/%v", version, commit, date, runtime.GOOS, runtime.GOARCH)
if *versionFlag {
fmt.Println(versionInfo)
os.Exit(0)
Expand Down Expand Up @@ -311,6 +312,7 @@ func main() {
if err != nil {
glog.Fatalf("error retrieving k8s version: %v", err)
}
glog.Infof("Kubernetes version: %v", k8sVersion)

minK8sVersion, err := util_version.ParseGeneric("1.19.0")
if err != nil {
Expand Down

0 comments on commit 1e38b54

Please sign in to comment.