1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

RemovePodsViolatingNodeTaints: list only pods that are not failed/suceeded

Listing pods was incorrectly changed to listing all pods during code
refactoring.
This commit is contained in:
Jan Chaloupka
2025-05-10 21:12:02 +02:00
parent e466307d7c
commit 6691720da5

View File

@@ -106,7 +106,7 @@ func (d *RemovePodsViolatingNodeTaints) Name() string {
func (d *RemovePodsViolatingNodeTaints) Deschedule(ctx context.Context, nodes []*v1.Node) *frameworktypes.Status {
for _, node := range nodes {
klog.V(1).InfoS("Processing node", "node", klog.KObj(node))
pods, err := podutil.ListAllPodsOnANode(node.Name, d.handle.GetPodsAssignedToNodeFunc(), d.podFilter)
pods, err := podutil.ListPodsOnANode(node.Name, d.handle.GetPodsAssignedToNodeFunc(), d.podFilter)
if err != nil {
// no pods evicted as error encountered retrieving evictable Pods
return &frameworktypes.Status{