karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Add grace-eviction-controller to evict cluster workload

Open XiShanYongYe-Chang opened this issue 2 years ago • 6 comments

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-period flag for karmada-controller-manager to 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-controller which performs the following two things:
    • Firstly, set the creationTimestamp for task in the binding's spec.gracefulEvictionTasks.
    • Secondly, after the task times out, delete the task from the binding's spec.gracefulEvictionTasks.

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`

XiShanYongYe-Chang avatar Aug 04 '22 04:08 XiShanYongYe-Chang

/cc @RainbowMango @Garrybest

XiShanYongYe-Chang avatar Aug 04 '22 12:08 XiShanYongYe-Chang

Generally lgtm, only one suggestion, such as flag or controller name, I think graceful-eviction is better than grace-evition.

Poor12 avatar Aug 05 '22 08:08 Poor12

Generally lgtm, only one suggestion, such as flag or controller name, I think graceful-eviction is better than grace-evition.

Thanks, I agree with you.

XiShanYongYe-Chang avatar Aug 05 '22 08:08 XiShanYongYe-Chang

/lgtm

Garrybest avatar Aug 09 '22 10:08 Garrybest

/hold

XiShanYongYe-Chang avatar Aug 15 '22 01:08 XiShanYongYe-Chang

/hold cancel

XiShanYongYe-Chang avatar Aug 15 '22 01:08 XiShanYongYe-Chang

/approve

RainbowMango avatar Aug 15 '22 02:08 RainbowMango

[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 avatar Aug 15 '22 02:08 karmada-bot