1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

Update duplicate pods removal strategy.

This commit is contained in:
Avesh Agarwal
2017-08-03 02:07:50 -04:00
parent 7a2a3ce91a
commit adb84cab8d
4 changed files with 31 additions and 12 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/aveshagarwal/rescheduler/pkg/rescheduler/client"
//"github.com/aveshagarwal/rescheduler/pkg/rescheduler/node"
//"github.com/aveshagarwal/rescheduler/pkg/rescheduler/pod"
eutils "github.com/aveshagarwal/rescheduler/pkg/rescheduler/evictions/utils"
"github.com/aveshagarwal/rescheduler/pkg/rescheduler/strategies"
"github.com/spf13/cobra"
@@ -56,7 +57,13 @@ func Run(rs *options.ReschedulerServer) error {
return err
}
rs.Client = rsclient
strategies.RemoveDuplicatePods(rs.Client)
policyGroupVersion, err := eutils.SupportEviction(rs.Client)
if err != nil || len(policyGroupVersion) == 0 {
return err
}
strategies.RemoveDuplicatePods(rs.Client, policyGroupVersion)
/*stopChannel := make(chan struct{})
nodes, err := node.ReadyNodes(rs.Client, stopChannel)
if err != nil {