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

Implement resource utilization threhsolds types.

This commit is contained in:
Avesh Agarwal
2017-08-03 19:39:52 -04:00
parent adb84cab8d
commit 4be75d86f6

View File

@@ -20,6 +20,7 @@ import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api/v1"
)
type ReschedulerPolicy struct {
@@ -27,4 +28,30 @@ type ReschedulerPolicy struct {
// Time interval for rescheduler to run
ReschedulingInterval time.Duration
// Strategies
Strategies []ReschedulerStrategy
}
type ReschedulerStrategy struct {
// Name of strategy
Name string
// Enabled or disabled
Enabled bool
// Weight
Weight int
// Strategy parameters
Params StrategyParameters
}
type percentage int
type ResourceUtilizationThresholds map[v1.ResourceName]percentage
// Only one of its members may be specified
type StrategyParameters struct {
ResourceUtilizationThresholds *ResourceUtilizationThresholds
}