Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

koord-descheduler: add migration object limiter for namespace #2068

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

songtao98
Copy link
Contributor

Ⅰ. Describe what this PR does

This PR add a new type of migration object limiter for namespace.
To implement this, the arbitrator of MigrationController traverses all objectLimiters and judge a pod through limiters enabled one by one.
When a pod is judged by Workload limiter, first try to get its ownerReference, if there is no ownerReference of this pod, just skip it.
When a pod is judged by Namespace limiter, judge it by number of migrated pods in this namespace.
The similar logic is implemented in trackEvictedPod function, too.

Ⅱ. Does this pull request fix one issue?

fixes #2051

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@koordinator-bot koordinator-bot bot requested review from eahydra and FillZpp May 27, 2024 12:51
@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign eahydra after the PR has been reviewed.
You can assign the PR to them by writing /assign @eahydra in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@songtao98 songtao98 force-pushed the support_namespace_migration_limit branch 2 times, most recently from 37e3272 to a9a9d87 Compare May 28, 2024 01:55
Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 77.64706% with 19 lines in your changes missing coverage. Please review.

Project coverage is 68.68%. Comparing base (6861c87) to head (f8c322b).

Files Patch % Lines
...kg/descheduler/controllers/migration/controller.go 79.51% 10 Missing and 7 partials ⚠️
...heduler/controllers/migration/arbitrator/filter.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2068   +/-   ##
=======================================
  Coverage   68.68%   68.68%           
=======================================
  Files         435      435           
  Lines       40703    40741   +38     
=======================================
+ Hits        27955    27984   +29     
- Misses      10337    10346    +9     
  Partials     2411     2411           
Flag Coverage Δ
unittests 68.68% <77.64%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@songtao98
Copy link
Contributor Author

/hold

@songtao98 songtao98 force-pushed the support_namespace_migration_limit branch from 8142750 to 0f4dfd8 Compare June 20, 2024 12:54
@songtao98 songtao98 force-pushed the support_namespace_migration_limit branch from 0f4dfd8 to cd139f3 Compare June 28, 2024 08:06
@songtao98
Copy link
Contributor Author

/unhold

Signed-off-by: songtao98 <songtao2603060@gmail.com>
@songtao98 songtao98 force-pushed the support_namespace_migration_limit branch from cd139f3 to f8c322b Compare July 15, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[proposal] koord-descheduler support objectLimiter for namespace
1 participant