mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Split proxy and scheduler arguments
Keep options and flags distinct from initialization
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user