Add grace-eviction-controller to evict cluster workload
Signed-off-by: changzhen [email protected]
What type of PR is this?
/kind feature
What this PR does / why we need it:
- Add
grace-eviction-periodflag forkarmada-controller-managerto specifies the timeout period waiting for the grace-eviction-controller performs the final removal when the workload(resource) has been moved to the graceful eviction tasks. - Add
grace-eviction-controllerwhich performs the following two things:- Firstly, set the
creationTimestampfor task in the binding'sspec.gracefulEvictionTasks. - Secondly, after the task times out, delete the task from the binding's
spec.gracefulEvictionTasks.
- Firstly, set the
Which issue(s) this PR fixes: part #2281
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
karmada-controller-manager: add `graceful-eviction-timeout` flag, default value: 10min
karmada-controller-manager: add `grace-eviction-controller`
/cc @RainbowMango @Garrybest
Generally lgtm, only one suggestion, such as flag or controller name, I think graceful-eviction is better than grace-evition.
Generally lgtm, only one suggestion, such as flag or controller name, I think
graceful-evictionis better thangrace-evition.
Thanks, I agree with you.
/lgtm
/hold
/hold cancel
/approve
[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
- ~~OWNERS~~ [RainbowMango]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment