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: support node selector for each descheduler profile #2168

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

Conversation

songtao98
Copy link
Contributor

Ⅰ. Describe what this PR does

The DeschedulerConfiguration supports users to config multiple profiles with different plugin enabled with different pluginConfigs. There are user cases such as to config HighNodeUtilization plugin with different threshold in different group of nodes, e.g. nodepools. However, most of the plugins only supports to filter pods through specific filters.

When dealing with nodes, it is the descheduler framework to decide which nodes can be plugins' checking target through a global nodeSelector. This PR enables configuration of nodeSelector further into each profile. Note that the descheduler framework will first select nodes at a global level through the outer nodeSelector, then select nodes according to each profile's inside nodeSelector.

Ⅱ. Does this pull request fix one issue?

Ⅲ. 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

Signed-off-by: songtao98 <songtao2603060@gmail.com>
@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

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 67.89%. Comparing base (05e4dc3) to head (6ddc04c).
Report is 57 commits behind head on main.

Files with missing lines Patch % Lines
pkg/descheduler/framework/runtime/framework.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2168      +/-   ##
==========================================
+ Coverage   67.86%   67.89%   +0.02%     
==========================================
  Files         443      443              
  Lines       41921    41925       +4     
==========================================
+ Hits        28451    28466      +15     
+ Misses      11014    11005       -9     
+ Partials     2456     2454       -2     
Flag Coverage Δ
unittests 67.89% <66.66%> (+0.02%) ⬆️

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.

@@ -77,6 +77,7 @@ type DeschedulerProfile struct {
Name string
PluginConfig []PluginConfig
Plugins *Plugins
NodeSelector *metav1.LabelSelector
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a plugin configuration?

Copy link
Contributor Author

@songtao98 songtao98 Aug 14, 2024

Choose a reason for hiding this comment

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

Generally speaking Yes. And actually I recommend plugins to support configuration of multiple NodeSelector like what LowNodeLoad do with NodePool. This PR is intended to solve the kubernetes descheduler plugin adaption problem for multiple node configuration.

Anyway, MigrationController has some bugs for multiple profiles. This PR will be hold for some time.

@songtao98
Copy link
Contributor Author

/hold

Copy link

stale bot commented Nov 13, 2024

This issue has been automatically marked as stale because it has not had recent activity.
This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the issue is closed
    You can:
  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close
    Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants