mirror of https://github.com/k3s-io/k3s
Merge pull request #63481 from hzxuzhonghu/rm-GOMAXPROCS
Automatic merge from submit-queue (batch tested with PRs 63460, 63481). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove redundant runtime.GOMAXPROCS Since golang 1.5, `By default, Go programs run with GOMAXPROCS set to the number of cores available;` If env `GOMAXPROCS `, it uses default `runtime.NumCPU()`. So set again is redundant. cc @deads2k **Release note**: ```release-note NONE ```pull/8/head
commit
f4b2452654
|
@ -19,7 +19,6 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
|
@ -32,10 +31,6 @@ func main() {
|
|||
logs.InitLogs()
|
||||
defer logs.FlushLogs()
|
||||
|
||||
if len(os.Getenv("GOMAXPROCS")) == 0 {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
}
|
||||
|
||||
stopCh := genericapiserver.SetupSignalHandler()
|
||||
cmd := server.NewCommandStartCustomResourceDefinitionsServer(os.Stdout, os.Stderr, stopCh)
|
||||
cmd.Flags().AddGoFlagSet(flag.CommandLine)
|
||||
|
|
|
@ -19,7 +19,6 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
|
@ -39,10 +38,6 @@ func main() {
|
|||
logs.InitLogs()
|
||||
defer logs.FlushLogs()
|
||||
|
||||
if len(os.Getenv("GOMAXPROCS")) == 0 {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
}
|
||||
|
||||
stopCh := genericapiserver.SetupSignalHandler()
|
||||
options := server.NewDefaultOptions(os.Stdout, os.Stderr)
|
||||
cmd := server.NewCommandStartAggregator(options, stopCh)
|
||||
|
|
|
@ -19,7 +19,6 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
|
@ -32,10 +31,6 @@ func main() {
|
|||
logs.InitLogs()
|
||||
defer logs.FlushLogs()
|
||||
|
||||
if len(os.Getenv("GOMAXPROCS")) == 0 {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
}
|
||||
|
||||
stopCh := genericapiserver.SetupSignalHandler()
|
||||
options := server.NewWardleServerOptions(os.Stdout, os.Stderr)
|
||||
cmd := server.NewCommandStartWardleServer(options, stopCh)
|
||||
|
|
Loading…
Reference in New Issue