Skip to content

Commit

Permalink
Merge pull request #922 from jklaw90/remove-plugin
Browse files Browse the repository at this point in the history
removing dupe plugin interface check
  • Loading branch information
k8s-ci-robot authored Aug 25, 2022
2 parents 70df896 + bfcd310 commit 1eade5b
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
5 changes: 1 addition & 4 deletions pkg/framework/plugins/podlifetime/pod_lifetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions pkg/framework/plugins/removeduplicates/removeduplicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -50,7 +51,6 @@ type RemoveDuplicates struct {
podFilter podutil.FilterFunc
}

var _ framework.Plugin = &RemoveDuplicates{}
var _ framework.BalancePlugin = &RemoveDuplicates{}

type podOwner struct {
Expand Down
1 change: 0 additions & 1 deletion pkg/framework/plugins/removefailedpods/failedpods.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1eade5b

Please sign in to comment.