karmada
karmada copied to clipboard
Add placement for bindingSpec
Signed-off-by: Poor12 [email protected]
What type of PR is this? /kind api-change
What this PR does / why we need it:
Now taintManager gets placement from annotations of Binding, mainly for clusterToleration field to check whether the binding should be evicted from targe cluster right now.
Scheduler gets placement from annotations of Binding, to check whether the placement has changed.
Add placement for BindingSpec can reduce the dependency of policy and make API more clear. Now the component above will check the placement of bindingSpec first and switch to get placement from annotations if placement of bindSpec is empty.
It can be smoothly upgraded from a lower version to a higher version. If karmada-controller-manager upgrades, spec.placement will occur according to the placement of policy .
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: None
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign kevin-wangzefeng after the PR has been reviewed.
You can assign the PR to them by writing /assign @kevin-wangzefeng in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Now we get placement from annotations of Binding, add toleration for bindingSpec so that taintManager do not need to query pp.
Please explain it in more detail. Who is we? Please show the code where this change would benefit.
Codecov Report
Merging #2702 (5eff625) into master (69ecff6) will increase coverage by
0.36%. The diff coverage is0.00%.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## master #2702 +/- ##
==========================================
+ Coverage 47.98% 48.35% +0.36%
==========================================
Files 200 201 +1
Lines 18082 18070 -12
==========================================
+ Hits 8677 8738 +61
+ Misses 8924 8847 -77
- Partials 481 485 +4
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 48.35% <0.00%> (+0.36%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/detector/detector.go | 0.00% <0.00%> (ø) |
|
| pkg/scheduler/core/generic_scheduler.go | 0.00% <0.00%> (ø) |
|
| pkg/scheduler/event_handler.go | 28.17% <0.00%> (+4.16%) |
:arrow_up: |
| pkg/scheduler/scheduler.go | 18.51% <0.00%> (+0.41%) |
:arrow_up: |
| ...einterpreter/defaultinterpreter/aggregatestatus.go | 71.02% <0.00%> (-0.52%) |
:arrow_down: |
| pkg/karmadactl/util/idempotency.go | 23.07% <0.00%> (ø) |
|
| pkg/karmadactl/cmdinit/karmada/deploy.go | 0.00% <0.00%> (ø) |
|
| pkg/karmadactl/cmdinit/cmdinit.go | 72.36% <0.00%> (ø) |
|
| pkg/search/proxy/store/util.go | 93.36% <0.00%> (+0.47%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
https://github.com/karmada-io/karmada/blob/1d2028b10f9b9d9ca30fe8e963b4557d347c8f51/pkg/controllers/cluster/taint_manager.go#L219-L248
Are you trying to optimize this piece of code?
https://github.com/karmada-io/karmada/blob/1d2028b10f9b9d9ca30fe8e963b4557d347c8f51/pkg/controllers/cluster/taint_manager.go#L219-L248
Are you trying to optimize this piece of code?
Not quite. Mainly to make calls simpler and make the API clearer.
/cc @RainbowMango
Please add an agenda to next week's community meeting for public comment.
Let me take a review. /assign
Please fix the CI.
/assign
This PR could help #2968 for determining whether a binding is divided scheduling easily.
[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