Split proxy and scheduler arguments

Keep options and flags distinct from initialization
This commit is contained in:
Clayton Coleman
2015-12-24 19:27:57 -05:00
parent b1e4831265
commit 715b77cbcd
11 changed files with 215 additions and 146 deletions

View File

@@ -22,6 +22,7 @@ import (
"runtime"
"k8s.io/kubernetes/cmd/kube-proxy/app"
"k8s.io/kubernetes/cmd/kube-proxy/app/options"
"k8s.io/kubernetes/pkg/healthz"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/version/verflag"
@@ -35,7 +36,7 @@ func init() {
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
config := app.NewProxyConfig()
config := options.NewProxyConfig()
config.AddFlags(pflag.CommandLine)
util.InitFlags()
@@ -50,7 +51,7 @@ func main() {
os.Exit(1)
}
if err = s.Run(pflag.CommandLine.Args()); err != nil {
if err = s.Run(); err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}