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

proposal: introducing a scheduling strategy to customize cluster propagation priorities #5512

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

Conversation

chaosi-zju
Copy link
Member

What type of PR is this?

/kind feature
/kind design

What this PR does / why we need it:

This proposal introduces a new user scenario for scheduling, where users have preferences for clusters with
varying priorities and want replicas assigned to their preferred clusters.

To support this scenario, we propose two alternative solutions: one is adding aggregatePreference to the existing
Weighted replica scheduling strategy, and the other is enhancing the capability of multiple scheduling groups.

Ultimately, we compare these two options and decide on the best implementation to provide a scheduling strategy
that allows users to customize cluster propagation priorities.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. kind/design Categorizes issue or PR as related to design. labels Sep 10, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kevin-wangzefeng for approval. For more information see the Kubernetes Code Review Process.

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

@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 10, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.18%. Comparing base (32c2ef7) to head (368a6ae).
Report is 369 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5512       +/-   ##
===========================================
+ Coverage   31.70%   43.18%   +11.48%     
===========================================
  Files         643      656       +13     
  Lines       44445    55921    +11476     
===========================================
+ Hits        14090    24149    +10059     
- Misses      29325    30214      +889     
- Partials     1030     1558      +528     
Flag Coverage Δ
unittests 43.18% <ø> (+11.48%) ⬆️

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.

@chaosi-zju chaosi-zju force-pushed the aggregate-proposal branch 2 times, most recently from 3d020fd to add8e03 Compare September 10, 2024 06:29
@chaosi-zju chaosi-zju changed the title [WIP] proposal: introducing a scheduling strategy to customize cluster propagation priorities proposal: introducing a scheduling strategy to customize cluster propagation priorities Nov 8, 2024
@karmada-bot karmada-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2024
@chaosi-zju
Copy link
Member Author

/retest

Comment on lines +98 to +100
+ // ReplicaDivisionPreferencePriorityAggregated assigns replicas to higher-priority clusters first,
+ // then to lower-priority clusters if resources are insufficient.
+ ReplicaDivisionPreferencePriorityAggregated ReplicaDivisionPreference = "PriorityAggregated"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
+ // ReplicaDivisionPreferencePriorityAggregated assigns replicas to higher-priority clusters first,
+ // then to lower-priority clusters if resources are insufficient.
+ ReplicaDivisionPreferencePriorityAggregated ReplicaDivisionPreference = "PriorityAggregated"
// ReplicaDivisionPreferencePriorityAggregated assigns replicas to higher-priority clusters first,
// then to lower-priority clusters if resources are insufficient.
ReplicaDivisionPreferencePriorityAggregated ReplicaDivisionPreference = "PriorityAggregated"

Copy link
Member

Choose a reason for hiding this comment

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

Does the PriorityAggregated still honor the score plugins in the scheduler? In another world, what's the relationship of them?

Copy link
Member Author

Choose a reason for hiding this comment

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

The sign "+" can reflect which lines are newly added. Does this need to be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Does the PriorityAggregated still honor the score plugins in the scheduler? In another world, what's the relationship of them?

I have updated the doc, this answer is in Controller logic changes paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants