Skip to content

fix: build NodeInfoMap before ExcludeTaintedNodePods filter#290

Merged
leomao10 merged 2 commits into
atlassian:masterfrom
leomao10:cesposito/fix-exclude-tainted-node-pods
Apr 16, 2026
Merged

fix: build NodeInfoMap before ExcludeTaintedNodePods filter#290
leomao10 merged 2 commits into
atlassian:masterfrom
leomao10:cesposito/fix-exclude-tainted-node-pods

Conversation

@leomao10
Copy link
Copy Markdown
Contributor

@leomao10 leomao10 commented Apr 16, 2026

When ExcludeTaintedNodePods is enabled, NodeInfoMap was previously built from the already-filtered pod list, causing NodeEmpty() to always return true for tainted nodes. This resulted in premature soft-path deletion of nodes that still had running pods.

Fix: move CreateNodeNameToInfoMap() to before the ExcludeTaintedNodePods filter so it always reflects the true pod state. The filtered pod list is used only for capacity calculations (CPU/memory utilisation).

Also adds a regression test verifying that a tainted node with a running non-daemonset pod is not deleted via the soft path.

Address comments in #289 because I don't have permission to update that fork.


Rovo Dev code review: Rovo Dev couldn't review this pull request
The pull request author does not have access to Rovo Dev.

cespo and others added 2 commits April 15, 2026 23:05
When ExcludeTaintedNodePods is enabled, NodeInfoMap was previously built
from the already-filtered pod list, causing NodeEmpty() to always return
true for tainted nodes. This resulted in premature soft-path deletion of
nodes that still had running pods.

Fix: move CreateNodeNameToInfoMap() to before the ExcludeTaintedNodePods
filter so it always reflects the true pod state. The filtered pod list is
used only for capacity calculations (CPU/memory utilisation).

Also adds a regression test verifying that a tainted node with a running
non-daemonset pod is not deleted via the soft path.
Copy link
Copy Markdown
Collaborator

@dtnyn dtnyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with the changes that addressed the comments on the previous PR #289

@leomao10 leomao10 merged commit e6986f1 into atlassian:master Apr 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants