mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 21:31:18 +01:00
Update low node utlization strategy.
This commit is contained in:
@@ -67,7 +67,7 @@ func Run(rs *options.ReschedulerServer) error {
|
||||
if reschedulerPolicy != nil {
|
||||
fmt.Printf("\nreschedulerPolicy: %#v\n", reschedulerPolicy)
|
||||
} else {
|
||||
fmt.Printf("\nreschedulerPolicy is nil\n")
|
||||
return fmt.Errorf("\nreschedulerPolicy is nil\n")
|
||||
|
||||
}
|
||||
evictionPolicyGroupVersion, err := eutils.SupportEviction(rs.Client)
|
||||
@@ -82,7 +82,7 @@ func Run(rs *options.ReschedulerServer) error {
|
||||
}
|
||||
|
||||
strategies.RemoveDuplicatePods(rs.Client, evictionPolicyGroupVersion, nodes)
|
||||
strategies.LowNodeUtilization(rs.Client, evictionPolicyGroupVersion, nodes)
|
||||
strategies.LowNodeUtilization(rs.Client, reschedulerPolicy.Strategies["LowNodeUtilization"], evictionPolicyGroupVersion, nodes)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import (
|
||||
|
||||
type NodeUsageMap map[*v1.Node]api.ResourceThresholds
|
||||
|
||||
func LowNodeUtilization(client clientset.Interface, policyGroupVersion string, nodes []*v1.Node) {
|
||||
func LowNodeUtilization(client clientset.Interface, strategy api.ReschedulerStrategy, evictionPolicyGroupVersion string, nodes []*v1.Node) {
|
||||
nodeUsageMap := NodeUsageMap{}
|
||||
for _, node := range nodes {
|
||||
nodeUsageMap[node] = NodeUtilization(client, node)
|
||||
|
||||
Reference in New Issue
Block a user