From b2bfb0e24ff4ce48c1af0ced0788a80a20942dd4 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Fri, 4 Aug 2017 14:01:55 -0400 Subject: [PATCH] Add number of nodes thershold to node utilization strategies. --- pkg/api/types.go | 5 +++-- pkg/api/v1alpha1/types.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/api/types.go b/pkg/api/types.go index 249bcf328..5cd936003 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -20,7 +20,7 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/v1" ) type ReschedulerPolicy struct { @@ -53,9 +53,10 @@ type StrategyParameters struct { } type Percentage int -type ResourceThresholds map[api.ResourceName]Percentage +type ResourceThresholds map[v1.ResourceName]Percentage type NodeResourceUtilizationThresholds struct { Thresholds ResourceThresholds TargetThresholds ResourceThresholds + NumberOfNodes int } diff --git a/pkg/api/v1alpha1/types.go b/pkg/api/v1alpha1/types.go index 843c44b99..70cf52889 100644 --- a/pkg/api/v1alpha1/types.go +++ b/pkg/api/v1alpha1/types.go @@ -58,4 +58,5 @@ type ResourceThresholds map[v1.ResourceName]Percentage type NodeResourceUtilizationThresholds struct { Thresholds ResourceThresholds `json:"thresholds,omitempty"` TargetThresholds ResourceThresholds `json:"targetThresholds,omitempty"` + NumberOfNodes int `json:"numberOfNodes,omitempty"` }