← Back to Pull requests

nrt: restore assumed resources for terminated pods #1018

Open
unknown opened this pull request with 391 lines diff across 4 files
View on GitHub
unknown unknown commented on Oct 13, 2026 11:28 UTC
Author

<!-- Thanks for sending a pull request! Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide/first-contribution.md#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. For reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If you want faster PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
5. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

What type of PR is this?

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature

Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
/kind cleanup
/kind bug

What this PR does / why we need it:


Add a new pod handler that adjusts the NRT overreserve cache accounting upon deleting pod that matches the following :
1. is managed by the NRT scheduler
2. requests exclusive resources

Which issue(s) this PR fixes:


<!--
Automatically closes linked issue when PR is merged.
Usage: Fixes #<issue number>, or Fixes (paste link of issue).
_If PR is about failing-tests or flakes, please post the related issues/tests in a comment and do not use Fixes_

-->
Fixes #1024

Special notes for your reviewer:

Does this PR introduce a user-facing change?


<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->
``release-note
The NodeResourceTopology filter now treats improper topology data as unresolvable. The scheduler skips preemption for those failures, since preemption cannot fix them. This will end the scheduling cycle for a pod early as the PostFilter plugin will not be attempted.

Introduce a new configuration cache option that adjusts the overreserve accounting to restore resources of same-profile terminated pods, to avoid false Fitler rejections and false evictions. The field is configurable under the cache arguments called terminatedOwnPodsDetect and is disabled by default. To enable it, set its value to OnlyExclusiveResources. Allowed values are: None (disabled), OnlyExclusiveResources.
``

Diff: 391 lines (+293 / -98) across 4 files Reviewer: shajmakh Review duration: 71257m
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.50) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 391 lines diff across 4 files
0.50
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
44%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.357
Shallow Review Depth shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1018"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 44.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 50.1% (MEDIUM) · Higher = larger blast radius
50.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 44.7% · Lower = rushed or shallow review
44.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 27.7% · Safe to merge
27.7%