mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
removing dupe plugin interface check
This commit is contained in:
@@ -19,6 +19,7 @@ package nodeutilization
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -42,7 +43,6 @@ type HighNodeUtilization struct {
|
||||
podFilter func(pod *v1.Pod) bool
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &HighNodeUtilization{}
|
||||
var _ framework.BalancePlugin = &HighNodeUtilization{}
|
||||
|
||||
// NewHighNodeUtilization builds plugin from its arguments while passing a handle
|
||||
|
||||
@@ -19,6 +19,7 @@ package nodeutilization
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -40,7 +41,6 @@ type LowNodeUtilization struct {
|
||||
podFilter func(pod *v1.Pod) bool
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &LowNodeUtilization{}
|
||||
var _ framework.BalancePlugin = &LowNodeUtilization{}
|
||||
|
||||
// NewLowNodeUtilization builds plugin from its arguments while passing a handle
|
||||
|
||||
@@ -34,10 +34,7 @@ import (
|
||||
|
||||
const PluginName = "PodLifeTime"
|
||||
|
||||
var (
|
||||
_ framework.Plugin = &PodLifeTime{}
|
||||
_ framework.DeschedulePlugin = &PodLifeTime{}
|
||||
)
|
||||
var _ framework.DeschedulePlugin = &PodLifeTime{}
|
||||
|
||||
// PodLifeTime evicts pods on the node that violate the max pod lifetime threshold
|
||||
type PodLifeTime struct {
|
||||
|
||||
@@ -19,13 +19,14 @@ package removeduplicates
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"math"
|
||||
"reflect"
|
||||
"sigs.k8s.io/descheduler/pkg/utils"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"sigs.k8s.io/descheduler/pkg/utils"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
@@ -50,7 +51,6 @@ type RemoveDuplicates struct {
|
||||
podFilter podutil.FilterFunc
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &RemoveDuplicates{}
|
||||
var _ framework.BalancePlugin = &RemoveDuplicates{}
|
||||
|
||||
type podOwner struct {
|
||||
|
||||
@@ -42,7 +42,6 @@ type RemoveFailedPods struct {
|
||||
podFilter podutil.FilterFunc
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &RemoveFailedPods{}
|
||||
var _ framework.DeschedulePlugin = &RemoveFailedPods{}
|
||||
|
||||
// New builds plugin from its arguments while passing a handle
|
||||
|
||||
@@ -42,10 +42,7 @@ type RemovePodsHavingTooManyRestarts struct {
|
||||
podFilter podutil.FilterFunc
|
||||
}
|
||||
|
||||
var (
|
||||
_ framework.Plugin = &RemovePodsHavingTooManyRestarts{}
|
||||
_ framework.DeschedulePlugin = &RemovePodsHavingTooManyRestarts{}
|
||||
)
|
||||
var _ framework.DeschedulePlugin = &RemovePodsHavingTooManyRestarts{}
|
||||
|
||||
// New builds plugin from its arguments while passing a handle
|
||||
func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error) {
|
||||
|
||||
@@ -42,7 +42,6 @@ type RemovePodsViolatingInterPodAntiAffinity struct {
|
||||
podFilter podutil.FilterFunc
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &RemovePodsViolatingInterPodAntiAffinity{}
|
||||
var _ framework.DeschedulePlugin = &RemovePodsViolatingInterPodAntiAffinity{}
|
||||
|
||||
// New builds plugin from its arguments while passing a handle
|
||||
|
||||
@@ -39,7 +39,6 @@ type RemovePodsViolatingNodeAffinity struct {
|
||||
podFilter podutil.FilterFunc
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &RemovePodsViolatingNodeAffinity{}
|
||||
var _ framework.DeschedulePlugin = &RemovePodsViolatingNodeAffinity{}
|
||||
|
||||
// New builds plugin from its arguments while passing a handle
|
||||
|
||||
@@ -42,7 +42,6 @@ type RemovePodsViolatingNodeTaints struct {
|
||||
podFilter podutil.FilterFunc
|
||||
}
|
||||
|
||||
var _ framework.Plugin = &RemovePodsViolatingNodeTaints{}
|
||||
var _ framework.DeschedulePlugin = &RemovePodsViolatingNodeTaints{}
|
||||
|
||||
// New builds plugin from its arguments while passing a handle
|
||||
|
||||
Reference in New Issue
Block a user