Skip to content

Commit dda3b01

Browse files
committed
Remove special case for StatefulSets in scheduler
1 parent 3683e0a commit dda3b01

File tree

1 file changed

+1
-12
lines changed
  • plugin/pkg/scheduler/algorithmprovider/defaults

1 file changed

+1
-12
lines changed

plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go

+1-12
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func GetEquivalencePod(pod *v1.Pod) interface{} {
238238
// to be equivalent
239239
if len(pod.OwnerReferences) != 0 {
240240
for _, ref := range pod.OwnerReferences {
241-
if *ref.Controller && isValidControllerKind(ref.Kind) {
241+
if *ref.Controller {
242242
equivalencePod.ControllerRef = ref
243243
// a pod can only belongs to one controller
244244
break
@@ -248,17 +248,6 @@ func GetEquivalencePod(pod *v1.Pod) interface{} {
248248
return &equivalencePod
249249
}
250250

251-
// isValidControllerKind checks if a given controller's kind can be applied to equivalence pod algorithm.
252-
func isValidControllerKind(kind string) bool {
253-
switch kind {
254-
// list of kinds that we cannot handle
255-
case StatefulSetKind:
256-
return false
257-
default:
258-
return true
259-
}
260-
}
261-
262251
// EquivalencePod is a group of pod attributes which can be reused as equivalence to schedule other pods.
263252
type EquivalencePod struct {
264253
ControllerRef metav1.OwnerReference

0 commit comments

Comments
 (0)