mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-05 07:26:56 +00:00
Merge pull request #122292 from sanposhiho/nodeupdate
register Node/UpdateTaint event to plugins which has Node/Add only and doesn't have Node/UpdateTaint
This commit is contained in:
@@ -396,7 +396,16 @@ func (pl *dynamicResources) EventsToRegister() []framework.ClusterEventWithHint
|
||||
{Event: framework.ClusterEvent{Resource: framework.PodSchedulingContext, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterPodSchedulingContextChange},
|
||||
// A resource might depend on node labels for topology filtering.
|
||||
// A new or updated node may make pods schedulable.
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}},
|
||||
//
|
||||
// A note about UpdateNodeTaint event:
|
||||
// NodeAdd QueueingHint isn't always called because of the internal feature called preCheck.
|
||||
// As a common problematic scenario,
|
||||
// when a node is added but not ready, NodeAdd event is filtered out by preCheck and doesn't arrive.
|
||||
// In such cases, this plugin may miss some events that actually make pods schedulable.
|
||||
// As a workaround, we add UpdateNodeTaint event to catch the case.
|
||||
// We can remove UpdateNodeTaint when we remove the preCheck feature.
|
||||
// See: https://github.com/kubernetes/kubernetes/issues/110175
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel | framework.UpdateNodeTaint}},
|
||||
// A pod might be waiting for a class to get created or modified.
|
||||
{Event: framework.ClusterEvent{Resource: framework.ResourceClass, ActionType: framework.Add | framework.Update}},
|
||||
}
|
||||
|
||||
@@ -64,8 +64,17 @@ func (pl *InterPodAffinity) EventsToRegister() []framework.ClusterEventWithHint
|
||||
// an unschedulable Pod schedulable.
|
||||
// - Add. An unschedulable Pod may fail due to violating pod-affinity constraints,
|
||||
// adding an assigned Pod may make it schedulable.
|
||||
//
|
||||
// A note about UpdateNodeTaint event:
|
||||
// NodeAdd QueueingHint isn't always called because of the internal feature called preCheck.
|
||||
// As a common problematic scenario,
|
||||
// when a node is added but not ready, NodeAdd event is filtered out by preCheck and doesn't arrive.
|
||||
// In such cases, this plugin may miss some events that actually make pods schedulable.
|
||||
// As a workaround, we add UpdateNodeTaint event to catch the case.
|
||||
// We can remove UpdateNodeTaint when we remove the preCheck feature.
|
||||
// See: https://github.com/kubernetes/kubernetes/issues/110175
|
||||
{Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.All}},
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}},
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel | framework.UpdateNodeTaint}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,16 @@ func (pl *PodTopologySpread) EventsToRegister() []framework.ClusterEventWithHint
|
||||
{Event: framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.All}, QueueingHintFn: pl.isSchedulableAfterPodChange},
|
||||
// Node add|delete|update maybe lead an topology key changed,
|
||||
// and make these pod in scheduling schedulable or unschedulable.
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.Delete | framework.Update}, QueueingHintFn: pl.isSchedulableAfterNodeChange},
|
||||
//
|
||||
// A note about UpdateNodeTaint event:
|
||||
// NodeAdd QueueingHint isn't always called because of the internal feature called preCheck.
|
||||
// As a common problematic scenario,
|
||||
// when a node is added but not ready, NodeAdd event is filtered out by preCheck and doesn't arrive.
|
||||
// In such cases, this plugin may miss some events that actually make pods schedulable.
|
||||
// As a workaround, we add UpdateNodeTaint event to catch the case.
|
||||
// We can remove UpdateNodeTaint when we remove the preCheck feature.
|
||||
// See: https://github.com/kubernetes/kubernetes/issues/110175
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.Delete | framework.UpdateNodeLabel | framework.UpdateNodeTaint}, QueueingHintFn: pl.isSchedulableAfterNodeChange},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,16 @@ func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEventWithHint {
|
||||
// Pods may fail to find available PVs because the node labels do not
|
||||
// match the storage class's allowed topologies or PV's node affinity.
|
||||
// A new or updated node may make pods schedulable.
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}},
|
||||
//
|
||||
// A note about UpdateNodeTaint event:
|
||||
// NodeAdd QueueingHint isn't always called because of the internal feature called preCheck.
|
||||
// As a common problematic scenario,
|
||||
// when a node is added but not ready, NodeAdd event is filtered out by preCheck and doesn't arrive.
|
||||
// In such cases, this plugin may miss some events that actually make pods schedulable.
|
||||
// As a workaround, we add UpdateNodeTaint event to catch the case.
|
||||
// We can remove UpdateNodeTaint when we remove the preCheck feature.
|
||||
// See: https://github.com/kubernetes/kubernetes/issues/110175
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel | framework.UpdateNodeTaint}},
|
||||
// We rely on CSI node to translate in-tree PV to CSI.
|
||||
{Event: framework.ClusterEvent{Resource: framework.CSINode, ActionType: framework.Add | framework.Update}},
|
||||
// When CSIStorageCapacity is enabled, pods may become schedulable
|
||||
|
||||
@@ -280,7 +280,16 @@ func (pl *VolumeZone) EventsToRegister() []framework.ClusterEventWithHint {
|
||||
// Due to immutable field `storageClass.volumeBindingMode`, storageClass update events are ignored.
|
||||
{Event: framework.ClusterEvent{Resource: framework.StorageClass, ActionType: framework.Add}},
|
||||
// A new node or updating a node's volume zone labels may make a pod schedulable.
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}},
|
||||
//
|
||||
// A note about UpdateNodeTaint event:
|
||||
// NodeAdd QueueingHint isn't always called because of the internal feature called preCheck.
|
||||
// As a common problematic scenario,
|
||||
// when a node is added but not ready, NodeAdd event is filtered out by preCheck and doesn't arrive.
|
||||
// In such cases, this plugin may miss some events that actually make pods schedulable.
|
||||
// As a workaround, we add UpdateNodeTaint event to catch the case.
|
||||
// We can remove UpdateNodeTaint when we remove the preCheck feature.
|
||||
// See: https://github.com/kubernetes/kubernetes/issues/110175
|
||||
{Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel | framework.UpdateNodeTaint}},
|
||||
// A new pvc may make a pod schedulable.
|
||||
// Due to fields are immutable except `spec.resources`, pvc update events are ignored.
|
||||
{Event: framework.ClusterEvent{Resource: framework.PersistentVolumeClaim, ActionType: framework.Add}},
|
||||
|
||||
Reference in New Issue
Block a user