Set GOMAXPROCS. Print errors on stderr.
This commit is contained in:
@@ -21,6 +21,10 @@ limitations under the License.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/controllermanager"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
|
||||
@@ -29,6 +33,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
s := controllermanager.NewCMServer()
|
||||
s.AddFlags(pflag.CommandLine)
|
||||
|
||||
@@ -38,5 +43,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