mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
Commit for gofmt
Signed-off-by: ravisantoshgudimetla <ravisantoshgudimetla@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ package node
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
@@ -26,7 +27,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
|
||||
corelisters "k8s.io/kubernetes/pkg/client/listers/core/v1"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// ReadyNodes returns ready nodes irrespective of whether they are
|
||||
@@ -45,7 +45,7 @@ func ReadyNodes(client clientset.Interface, stopChannel <-chan struct{}) ([]*v1.
|
||||
return []*v1.Node{}, err
|
||||
}
|
||||
|
||||
for i, _ := range nItems.Items {
|
||||
for i := range nItems.Items {
|
||||
node := nItems.Items[i]
|
||||
nodes = append(nodes, &node)
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/kubernetes-incubator/descheduler/pkg/api"
|
||||
_ "github.com/kubernetes-incubator/descheduler/pkg/api/install"
|
||||
"github.com/kubernetes-incubator/descheduler/pkg/api/v1alpha1"
|
||||
"github.com/kubernetes-incubator/descheduler/pkg/descheduler/scheme"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
func LoadPolicyConfig(policyConfigFile string) (*api.DeschedulerPolicy, error) {
|
||||
|
||||
@@ -82,7 +82,7 @@ func validateThresholds(thresholds api.ResourceThresholds) bool {
|
||||
return false
|
||||
}
|
||||
found := false
|
||||
for name, _ := range thresholds {
|
||||
for name := range thresholds {
|
||||
if name == v1.ResourceCPU || name == v1.ResourceMemory || name == v1.ResourcePods {
|
||||
found = true
|
||||
break
|
||||
@@ -171,8 +171,6 @@ func evictPodsFromTargetNodes(client clientset.Interface, evictionPolicyGroupVer
|
||||
return podsEvicted
|
||||
}
|
||||
|
||||
|
||||
|
||||
func evictPods(inputPods []*v1.Pod,
|
||||
client clientset.Interface,
|
||||
evictionPolicyGroupVersion string,
|
||||
|
||||
Reference in New Issue
Block a user