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
Kubernetes Submit Queue 2018-05-07 06:48:07 -07:00 committed by GitHub
commit f4b2452654
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 15 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)