diff --git a/pkg/scheduler/framework/events.go b/pkg/scheduler/framework/events.go index 910c254c520..ab4c31a3f9e 100644 --- a/pkg/scheduler/framework/events.go +++ b/pkg/scheduler/framework/events.go @@ -130,7 +130,7 @@ func extractPodTolerationChange(newPod *v1.Pod, oldPod *v1.Pod) ActionType { // Due to API validation, the user can add, but cannot modify or remove tolerations. // So, it's enough to just check the length of tolerations to notice the update. // And, any updates in tolerations could make Pod schedulable. - return UpdatePodTolerations + return UpdatePodToleration } return none diff --git a/pkg/scheduler/framework/events_test.go b/pkg/scheduler/framework/events_test.go index 1f61ab1e56e..9c2232467f1 100644 --- a/pkg/scheduler/framework/events_test.go +++ b/pkg/scheduler/framework/events_test.go @@ -410,7 +410,7 @@ func Test_podSchedulingPropertiesChange(t *testing.T) { name: "pod's tolerations are updated", newPod: st.MakePod().Toleration("key").Toleration("key2").Obj(), oldPod: st.MakePod().Toleration("key").Obj(), - want: []ClusterEvent{{Resource: unschedulablePod, ActionType: UpdatePodTolerations}}, + want: []ClusterEvent{{Resource: unschedulablePod, ActionType: UpdatePodToleration}}, }, { name: "pod claim statuses change, feature disabled", diff --git a/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go b/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go index f807f95d5fa..50a4264aa1a 100644 --- a/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go +++ b/pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable.go @@ -68,7 +68,7 @@ func (pl *NodeUnschedulable) EventsToRegister(_ context.Context) ([]framework.Cl // the scheduling queue uses Pod/Update Queueing Hint // to determine whether a Pod's update makes the Pod schedulable or not. // https://github.com/kubernetes/kubernetes/pull/122234 - {Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.UpdatePodTolerations}, QueueingHintFn: pl.isSchedulableAfterPodTolerationChange}, + {Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.UpdatePodToleration}, QueueingHintFn: pl.isSchedulableAfterPodTolerationChange}, }, nil } diff --git a/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go b/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go index a0406c661c0..4295755ca8a 100644 --- a/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go +++ b/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go @@ -146,8 +146,8 @@ func (pl *PodTopologySpread) EventsToRegister(_ context.Context) ([]framework.Cl // // The Pod rejected by this plugin can be schedulable when the Pod has a spread constraint with NodeTaintsPolicy:Honor // and has got a new toleration. - // So, we add UpdatePodTolerations here only when QHint is enabled. - podActionType = framework.Add | framework.UpdatePodLabel | framework.UpdatePodTolerations | framework.Delete + // So, we add UpdatePodToleration here only when QHint is enabled. + podActionType = framework.Add | framework.UpdatePodLabel | framework.UpdatePodToleration | framework.Delete } return []framework.ClusterEventWithHint{ diff --git a/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go b/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go index 78bb73f1ee8..5caff62235d 100644 --- a/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go +++ b/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go @@ -67,7 +67,7 @@ func (pl *TaintToleration) EventsToRegister(_ context.Context) ([]framework.Clus // the scheduling queue uses Pod/Update Queueing Hint // to determine whether a Pod's update makes the Pod schedulable or not. // https://github.com/kubernetes/kubernetes/pull/122234 - {Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.UpdatePodTolerations}, QueueingHintFn: pl.isSchedulableAfterPodTolerationChange}, + {Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.UpdatePodToleration}, QueueingHintFn: pl.isSchedulableAfterPodTolerationChange}, }, nil } diff --git a/pkg/scheduler/framework/types.go b/pkg/scheduler/framework/types.go index ac671899771..9d21e7e448e 100644 --- a/pkg/scheduler/framework/types.go +++ b/pkg/scheduler/framework/types.go @@ -72,9 +72,9 @@ const ( UpdatePodLabel // UpdatePodScaleDown is an update for pod's scale down (i.e., any resource request is reduced). UpdatePodScaleDown - // UpdatePodTolerations is an addition for pod's tolerations. + // UpdatePodToleration is an addition for pod's tolerations. // (Due to API validation, we can add, but cannot modify or remove tolerations.) - UpdatePodTolerations + UpdatePodToleration // UpdatePodSchedulingGatesEliminated is an update for pod's scheduling gates, which eliminates all scheduling gates in the Pod. UpdatePodSchedulingGatesEliminated // UpdatePodGeneratedResourceClaim is an update of the list of ResourceClaims generated for the pod. @@ -88,7 +88,7 @@ const ( All ActionType = 1<