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

@@ -19,19 +19,20 @@ limitations under the License.
package main
import (
scheduler "k8s.io/kubernetes/plugin/cmd/kube-scheduler/app"
"k8s.io/kubernetes/plugin/cmd/kube-scheduler/app"
"k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options"
)
// NewScheduler creates a new hyperkube Server object that includes the
// description and flags.
func NewScheduler() *Server {
s := scheduler.NewSchedulerServer()
s := options.NewSchedulerServer()
hks := Server{
SimpleUsage: "scheduler",
Long: "Implements a Kubernetes scheduler. This will assign pods to kubelets based on capacity and constraints.",
Run: func(_ *Server, args []string) error {
return s.Run(args)
Run: func(_ *Server, _ []string) error {
return app.Run(s)
},
}
s.AddFlags(hks.Flags())