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

Add grace-eviction-controller to evict cluster workload #2319

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang commented Aug 4, 2022

Signed-off-by: changzhen changzhen5@huawei.com

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`

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Aug 4, 2022
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 4, 2022
@XiShanYongYe-Chang XiShanYongYe-Chang force-pushed the graceful-evicting branch 2 times, most recently from eaf2047 to 6884594 Compare August 4, 2022 12:23
@XiShanYongYe-Chang XiShanYongYe-Chang changed the title [WIP] Add grace-eviction-controller to evict cluster workload Add grace-eviction-controller to evict cluster workload Aug 4, 2022
@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 Aug 4, 2022
@XiShanYongYe-Chang
Copy link
Member Author

/cc @RainbowMango @Garrybest

@Poor12
Copy link
Member

Poor12 commented Aug 5, 2022

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

@XiShanYongYe-Chang
Copy link
Member Author

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 XiShanYongYe-Chang force-pushed the graceful-evicting branch 2 times, most recently from 6bd00d6 to 15c714b Compare August 8, 2022 12:55
@Garrybest
Copy link
Member

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 9, 2022
cmd/controller-manager/app/controllermanager.go Outdated Show resolved Hide resolved
cmd/controller-manager/app/options/options.go Outdated Show resolved Hide resolved
cmd/controller-manager/app/controllermanager.go Outdated Show resolved Hide resolved
pkg/controllers/context/context.go Outdated Show resolved Hide resolved
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2022
@karmada-bot karmada-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 10, 2022
@XiShanYongYe-Chang XiShanYongYe-Chang force-pushed the graceful-evicting branch 2 times, most recently from 192d212 to 486c216 Compare August 12, 2022 10:14
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 15, 2022
@XiShanYongYe-Chang
Copy link
Member Author

/hold

@karmada-bot karmada-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2022
Signed-off-by: changzhen <changzhen5@huawei.com>
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2022
@XiShanYongYe-Chang
Copy link
Member Author

/hold cancel

@karmada-bot karmada-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2022
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2022
@RainbowMango
Copy link
Member

/approve

@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

@RainbowMango RainbowMango added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 15, 2022
@karmada-bot karmada-bot merged commit f4e7d5a into karmada-io:master Aug 15, 2022
@XiShanYongYe-Chang XiShanYongYe-Chang deleted the graceful-evicting branch August 25, 2022 01:10
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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants