-
Notifications
You must be signed in to change notification settings - Fork 852
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
Extend Binding API for graceful eviction #2273
Extend Binding API for graceful eviction #2273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any relevant proposals or issues linked to this PR, it would be very helpful to create one, describing background/motivation and also system behaviours especially when multiple evictors working together.
fdee34b
to
a392a7d
Compare
/assign |
// The intended workflow is: | ||
// 1. Once the controller(such as 'taint-manager') decided to evict the resource that | ||
// is referenced by current ResourceBinding or ClusterResourceBinding from a target | ||
// cluster, it removes(or scale down the replicas) the target from Clusters(.spec.Clusters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or scale down the replicas)
Do we need to move the scale down replicas into GracefulEvictionTasks
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, e.g.
spec:
clusters:
- name: member2
replicas: 10
- name: member1
replicas: 10
evict 5
replicas from member1
, then
spec:
clusters:
- name: member2
replicas: 10
- name: member1
replicas: 5
gracefulEvictionTasks:
- name: member1
replicas: 5
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may cause problems. .spec.clusters
describes the current cluster replicas distribution status. When the number of member2 replicas changes from 10 to 5, the number of workload replicas will be directly changed when ensuringWork
in binding-controller. This will conflict with the eviction behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the number of member2 replicas changes from 10 to 5,
member2
do you mean member1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clerical error. It does refer to member1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would be too complicated, and given the real use case is uncertain yet, I suppose we can remove the replicas
from gracefulEvictionTasks
. Now only focus on evicting the entire resource from clusters.
@Garrybest What do you say?
[edit] we can't remove the replicas
, just focus on the eviction scenario of taint-manager
.
// to take over the evicting workload(resource). | ||
// 3. The graceful eviction controller takes care of the graceful eviction tasks and | ||
// performs the final removal after the workload(resource) is available on the substitute | ||
// cluster or exceed the grace termination period(defaults to 10 minutes). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the grace termination period(defaults to 10 minutes).
Is this a configurable parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, probably. And a new field might be needed to hold the configurable parameter.
// If SchedulerObservedGeneration is less than the generation in metadata means the scheduler hasn't confirmed | ||
// the scheduling result or hasn't done the schedule yet. | ||
// +optional | ||
SchedulerObservedGeneration int64 `json:"schedulerObservedGeneration,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what if the evicition task has not been done yet but there comes a scaling-up event, how to deal with this situation by using SchedulerObservedGeneration
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I understand you correctly.
A general idea in my mind is that scheduler
shouldn't schedule the resource(in binding) to a cluster which already in one of the graceful eviction tasks
.
a392a7d
to
f1b67a9
Compare
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
f1b67a9
to
89f9c96
Compare
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: 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 |
What type of PR is this?
/kind api-change
/kind feature
What this PR does / why we need it:
This PR proposed the API change which is used to perform graceful eviction.
Which issue(s) this PR fixes:
Part of #2281
Special notes for your reviewer:
Does this PR introduce a user-facing change?: