mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 11:12:03 +00:00
Set GOMAXPROCS. Print errors on stderr.
This commit is contained in:
@@ -19,6 +19,10 @@ limitations under the License.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/server"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
|
||||
@@ -27,6 +31,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
s := server.NewAPIServer()
|
||||
s.AddFlags(pflag.CommandLine)
|
||||
|
||||
@@ -36,5 +41,8 @@ func main() {
|
||||
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
s.Run(pflag.CommandLine.Args())
|
||||
if err := s.Run(pflag.CommandLine.Args()); err != nil {
|
||||
fmt.Fprint(os.Stderr, err.Error)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user