Added new policy of maxodpernode#1849
Conversation
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @Deep28032001! |
|
Hi @Deep28032001. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Deep28032001 thank you for your contribution. Can you please more elaborate on benefits of the new plugin compared to the existing node utilization plugins? I.e. they already provide means to balance pods among nodes based on the resource utilization. There's |
Description
This PR introduces the MaxPodsPerNode descheduling strategy.
Summary of Changes:
New Plugin: Implemented the MaxPodsPerNode plugin under the descheduler/evictions framework.
Logic: The plugin identifies nodes exceeding a user-defined MaxPods threshold and evicts the most recently created pods (LIFO approach) until the node is within the limit.
Filtering: Supports standard descheduler filters, including namespace inclusion/exclusion and label selectors.
Sorting: Implements custom sorting using pods[j].CreationTimestamp.Before(&pods[i].CreationTimestamp) to ensure stability during rescheduling loops.
Motivation:
Currently, clusters can become unbalanced where specific nodes host a disproportionate number of pods, leading to resource contention or blast-radius concerns. This strategy provides a simple, count-based guardrail to trigger pod redistribution.
Checklist
Please ensure your pull request meets the following criteria before submitting
for review, these items will be used by reviewers to assess the quality and
completeness of your changes: