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 KEP-697: descheduler for karmada #726

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

Garrybest
Copy link
Member

What type of PR is this?
/kind design

What this PR does / why we need it:
The proposal for #697

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

This KEP proposes a new component, Descheduler, which has a similar behavior with Descheduler for Kubernetes, based on its policy, finds some replicas that can be moved and evicts them from a cluster.

@karmada-bot karmada-bot added kind/design Categorizes issue or PR as related to design. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 14, 2021
Signed-off-by: Garrybest <garrybest@foxmail.com>
@RainbowMango
Copy link
Member

Let's merge it and continue the discussion.
/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 25, 2021
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 25, 2021
@karmada-bot karmada-bot merged commit 21aaf62 into karmada-io:master Nov 25, 2021
@Garrybest Garrybest deleted the pr_descheduler_proposal branch November 25, 2021 13:40
@RainbowMango
Copy link
Member

Find the non-desired ones, i.e., whose desired replicas are less than ready replicas, and then request scheduler-estimator to get the replicas that need to be evicted.

How the descheduler detects non-desired replicas?

@RainbowMango
Copy link
Member

Modify scheduling result in resourcebindings.spec.clusters for eviction, i.e., substract unscheduable pods number in the relevant field resourcebindings.spec.clusters.

The .spec.clusters field is managed by karmada-scheduler, If descheduler updates this field, what else do you expect from scale scheduling? (since all decisions have been done by descheduler.)

@Garrybest
Copy link
Member Author

How the descheduler detects non-desired replicas?

Good question. It calls scheduler-estimator by gRPC to detect unscheduable replicas. We should add a new gRPC service interface into scheduler-estimator for detection.

@Garrybest
Copy link
Member Author

The .spec.clusters field is managed by karmada-scheduler, If descheduler updates this field, what else do you expect from scale scheduling? (since all decisions have been done by descheduler.)

Let me give a sample. Imagine we have a workload with 9 desired replicas. Now cluster1 has some nodes broken and 2 pods have been recreated. However, there are no more resource for them to be scheduled.

Firstly, descheduler find 2 pods are in failed-scheduled condition, it just decreases desired replicas of cluster1 from 6 to 4. And then scheduler finds the workload needs a scale scheduling, so it calls all scheduler-estimator for collecting max available replicas and make a scheduling decision to schedule the 2 replicas. In this case, the desired replicas of cluster1 will be changed from 3 to 5.
image

@RainbowMango
Copy link
Member

Yeah, got it, thanks. The descheduler only decrease the replica, then karmada-scheduler scale the replica to other available clusters.

@Garrybest Garrybest mentioned this pull request Jan 15, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/design Categorizes issue or PR as related to design. lgtm Indicates that a PR is ready to be merged. 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.

3 participants