mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 14:41:10 +01:00
Fix rescheduler server command.
This commit is contained in:
@@ -22,16 +22,19 @@ import (
|
|||||||
|
|
||||||
"github.com/aveshagarwal/rescheduler/cmd/rescheduler/app/options"
|
"github.com/aveshagarwal/rescheduler/cmd/rescheduler/app/options"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
//"github.com/golang/glog"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"github.com/spf13/pflag"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewReschedulerCommand creates a *cobra.Command object with default parameters
|
// NewReschedulerCommand creates a *cobra.Command object with default parameters
|
||||||
func NewReschedulerCommand() *cobra.Command {
|
func NewReschedulerCommand() *cobra.Command {
|
||||||
s := options.NewReschedulerServer()
|
s := options.NewReschedulerServer()
|
||||||
|
//s.AddFlags(pflag.CommandLine)
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "rescheduler",
|
Use: "rescheduler",
|
||||||
Long: `The rescheduler evicts pods which may be bound to less desired nodes`,
|
Short: "reschdeduler",
|
||||||
|
Long: `The rescheduler evicts pods which may be bound to less desired nodes`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
err := Run(s)
|
err := Run(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -41,9 +44,9 @@ func NewReschedulerCommand() *cobra.Command {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
s.AddFlags(cmd.Flags())
|
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func Run(opt *options.ReschedulerServer) error {
|
func Run(opt *options.ReschedulerServer) error {
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user