From cbbb8c0615a27f53f88fa56d3e282aa481c313c8 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Sun, 30 Jul 2017 12:27:16 -0400 Subject: [PATCH] Fix rescheduler server command. --- cmd/rescheduler/app/server.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/rescheduler/app/server.go b/cmd/rescheduler/app/server.go index 1a9259538..5a40e7899 100644 --- a/cmd/rescheduler/app/server.go +++ b/cmd/rescheduler/app/server.go @@ -22,16 +22,19 @@ import ( "github.com/aveshagarwal/rescheduler/cmd/rescheduler/app/options" - "github.com/golang/glog" + //"github.com/golang/glog" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) // NewReschedulerCommand creates a *cobra.Command object with default parameters func NewReschedulerCommand() *cobra.Command { s := options.NewReschedulerServer() + //s.AddFlags(pflag.CommandLine) cmd := &cobra.Command{ - Use: "rescheduler", - Long: `The rescheduler evicts pods which may be bound to less desired nodes`, + Use: "rescheduler", + Short: "reschdeduler", + Long: `The rescheduler evicts pods which may be bound to less desired nodes`, Run: func(cmd *cobra.Command, args []string) { err := Run(s) if err != nil { @@ -41,9 +44,9 @@ func NewReschedulerCommand() *cobra.Command { }, } - s.AddFlags(cmd.Flags()) return cmd } func Run(opt *options.ReschedulerServer) error { + return nil }