Remove GOMAXPROCS() calls because they are unnecessary

pull/6/head
Lucas Käldström 2016-07-19 11:08:21 +03:00
parent 01925c810b
commit 88ea80b572
16 changed files with 3 additions and 33 deletions

View File

@ -20,7 +20,6 @@ import (
"fmt"
"io"
"os"
"runtime"
kruntime "k8s.io/kubernetes/pkg/runtime"
@ -35,7 +34,6 @@ var (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
flag.Parse()
if *typeSrc == "" {

View File

@ -26,7 +26,6 @@ import (
"io/ioutil"
"os"
"path"
"runtime"
"k8s.io/kubernetes/pkg/util"
utilflag "k8s.io/kubernetes/pkg/util/flag"
@ -188,7 +187,6 @@ func (hk *HyperKube) Run(args []string) error {
// RunToExit will run the hyperkube and then call os.Exit with an appropriate exit code.
func (hk *HyperKube) RunToExit(args []string) {
runtime.GOMAXPROCS(runtime.NumCPU())
err := hk.Run(args)
if err != nil {
fmt.Fprint(os.Stderr, err.Error())

View File

@ -22,7 +22,6 @@ import (
"fmt"
"math/rand"
"os"
"runtime"
"time"
"k8s.io/kubernetes/cmd/kube-apiserver/app"
@ -35,7 +34,6 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
rand.Seed(time.Now().UTC().UnixNano())
s := options.NewAPIServer()

View File

@ -23,7 +23,6 @@ package main
import (
"fmt"
"os"
"runtime"
"k8s.io/kubernetes/cmd/kube-controller-manager/app"
"k8s.io/kubernetes/cmd/kube-controller-manager/app/options"
@ -40,7 +39,6 @@ func init() {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := options.NewCMServer()
s.AddFlags(pflag.CommandLine)

View File

@ -22,10 +22,11 @@ import (
"os"
"fmt"
"github.com/spf13/pflag"
"k8s.io/kubernetes/pkg/util/validation"
_ "net/http/pprof"
"strings"
"github.com/spf13/pflag"
"k8s.io/kubernetes/pkg/util/validation"
)
type KubeDNSConfig struct {

View File

@ -19,7 +19,6 @@ package main
import (
"fmt"
"os"
"runtime"
"k8s.io/kubernetes/cmd/kube-proxy/app"
"k8s.io/kubernetes/cmd/kube-proxy/app/options"
@ -36,7 +35,6 @@ func init() {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
config := options.NewProxyConfig()
config.AddFlags(pflag.CommandLine)

View File

@ -18,13 +18,11 @@ package main
import (
"os"
"runtime"
"k8s.io/kubernetes/cmd/kubectl/app"
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
if err := app.Run(); err != nil {
os.Exit(1)
}

View File

@ -23,7 +23,6 @@ package main
import (
"fmt"
"os"
"runtime"
"k8s.io/kubernetes/cmd/kubelet/app"
"k8s.io/kubernetes/cmd/kubelet/app/options"
@ -35,7 +34,6 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := options.NewKubeletServer()
s.AddFlags(pflag.CommandLine)

View File

@ -18,7 +18,6 @@ package main
import (
"fmt"
"runtime"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/client/record"
@ -83,7 +82,6 @@ func (c *HollowNodeConfig) createClientFromFile() (*client.Client, error) {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
config := HollowNodeConfig{}
config.addFlags(pflag.CommandLine)

View File

@ -19,7 +19,6 @@ package main
import (
"fmt"
"os"
"runtime"
"k8s.io/kubernetes/pkg/healthz"
"k8s.io/kubernetes/pkg/util"
@ -36,7 +35,6 @@ func init() {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := controllermanager.NewCMServer()
s.AddFlags(pflag.CommandLine)

View File

@ -19,7 +19,6 @@ package main
import (
"fmt"
"os"
"runtime"
"github.com/spf13/pflag"
"k8s.io/kubernetes/contrib/mesos/pkg/executor/service"
@ -30,7 +29,6 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := service.NewKubeletExecutorServer()
s.AddFlags(pflag.CommandLine)

View File

@ -19,7 +19,6 @@ package main
import (
"fmt"
"os"
"runtime"
"github.com/spf13/pflag"
"k8s.io/kubernetes/contrib/mesos/pkg/hyperkube"
@ -30,7 +29,6 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := service.NewSchedulerServer()
s.AddStandaloneFlags(pflag.CommandLine)

View File

@ -25,7 +25,6 @@ import (
"io/ioutil"
"os"
"path"
"runtime"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/version/verflag"
@ -177,7 +176,6 @@ func (hk *HyperKube) Run(args []string) error {
// RunToExit will run the hyperkube and then call os.Exit with an appropriate exit code.
func (hk *HyperKube) RunToExit(args []string) {
runtime.GOMAXPROCS(runtime.NumCPU())
err := hk.Run(args)
if err != nil {
fmt.Fprint(os.Stderr, err.Error())

View File

@ -22,7 +22,6 @@ import (
"fmt"
"math/rand"
"os"
"runtime"
"time"
"k8s.io/kubernetes/federation/cmd/federation-apiserver/app"
@ -35,7 +34,6 @@ import (
)
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
rand.Seed(time.Now().UTC().UnixNano())
s := genericoptions.NewServerRunOptions()

View File

@ -19,7 +19,6 @@ package main
import (
"fmt"
"os"
"runtime"
"github.com/spf13/pflag"
"k8s.io/kubernetes/federation/cmd/federation-controller-manager/app"
@ -35,7 +34,6 @@ func init() {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := options.NewCMServer()
s.AddFlags(pflag.CommandLine)

View File

@ -17,8 +17,6 @@ limitations under the License.
package main
import (
"runtime"
"k8s.io/kubernetes/pkg/healthz"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/flag"
@ -34,7 +32,6 @@ func init() {
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := options.NewSchedulerServer()
s.AddFlags(pflag.CommandLine)