mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-05 15:37:35 +00:00
register Node/UpdateNodeTaint event to plugins which has Node/Add only, doesn't have Node/UpdateNodeTaint
This commit is contained in:
@@ -118,6 +118,7 @@ type SchedulingQueue interface {
|
||||
AssignedPodAdded(logger klog.Logger, pod *v1.Pod)
|
||||
AssignedPodUpdated(logger klog.Logger, oldPod, newPod *v1.Pod)
|
||||
PendingPods() ([]*v1.Pod, string)
|
||||
PodsInActiveQ() []*v1.Pod
|
||||
// Close closes the SchedulingQueue so that the goroutine which is
|
||||
// waiting to pop items can exit gracefully.
|
||||
Close()
|
||||
@@ -1227,6 +1228,18 @@ func (p *PriorityQueue) getUnschedulablePodsWithMatchingAffinityTerm(logger klog
|
||||
return podsToMove
|
||||
}
|
||||
|
||||
// PodsInActiveQ returns all the Pods in the activeQ.
|
||||
// This function is only used in tests.
|
||||
func (p *PriorityQueue) PodsInActiveQ() []*v1.Pod {
|
||||
p.lock.RLock()
|
||||
defer p.lock.RUnlock()
|
||||
var result []*v1.Pod
|
||||
for _, pInfo := range p.activeQ.List() {
|
||||
result = append(result, pInfo.(*framework.QueuedPodInfo).Pod)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
var pendingPodsSummary = "activeQ:%v; backoffQ:%v; unschedulablePods:%v"
|
||||
|
||||
// PendingPods returns all the pending pods in the queue; accompanied by a debugging string
|
||||
|
||||
Reference in New Issue
Block a user