Skip to content

Commit ba61119

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#39718 from foxish/remove-statefulset-special-case
Automatic merge from submit-queue (batch tested with PRs 39230, 39718) Remove special case for StatefulSets in scheduler **What this PR does / why we need it**: Removes special case for StatefulSet in scheduler code /ref: kubernetes#39687 **Special notes for your reviewer**: **Release note**: ```release-note Scheduler treats StatefulSet pods as belonging to a single equivalence class. ```
2 parents 3ed7fb6 + dda3b01 commit ba61119

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)