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