moving genericapiserver command line flags to genericapiserver

This commit is contained in:
nikhiljindal
2016-04-06 15:24:48 -07:00
parent c9b6e89a39
commit 8d7a8c6ae6
5 changed files with 55 additions and 33 deletions

View File

@@ -18,12 +18,20 @@ package main
import (
"k8s.io/kubernetes/examples/apiserver"
"k8s.io/kubernetes/pkg/util/flag"
"github.com/golang/glog"
"github.com/spf13/pflag"
)
func main() {
if err := apiserver.Run(); err != nil {
serverRunOptions := apiserver.NewServerRunOptions()
// Parse command line flags.
serverRunOptions.AddFlags(pflag.CommandLine)
flag.InitFlags()
if err := apiserver.Run(serverRunOptions); err != nil {
glog.Fatalf("Error in bringing up the server: %v", err)
}
}