-
Notifications
You must be signed in to change notification settings - Fork 885
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
Clean up the residual annotations when resources are preempted by pp from cpp #5563
Conversation
test report:
apiVersion: v1
data:
a: b
kind: ConfigMap
metadata:
name: test-cm
namespace: default
apiVersion: policy.karmada.io/v1alpha1
kind: ClusterPropagationPolicy
metadata:
name: test-cpp
spec:
conflictResolution: Abort
placement:
clusterTolerations:
- effect: NoExecute
key: cluster.karmada.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: cluster.karmada.io/unreachable
operator: Exists
tolerationSeconds: 300
replicaScheduling:
replicaSchedulingType: Duplicated
preemption: Never
priority: 10
resourceSelectors:
- apiVersion: v1
kind: ConfigMap
name: test-cm
namespace: default
schedulerName: default-scheduler
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: test-pp
namespace: default
spec:
conflictResolution: Abort
placement:
clusterTolerations:
- effect: NoExecute
key: cluster.karmada.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: cluster.karmada.io/unreachable
operator: Exists
tolerationSeconds: 300
replicaScheduling:
replicaDivisionPreference: Aggregated
replicaSchedulingType: Divided
preemption: Always
priority: 0
resourceSelectors:
- apiVersion: v1
kind: ConfigMap
name: test-cm
namespace: default
schedulerName: default-scheduler and the marks on rb
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5563 +/- ##
==========================================
+ Coverage 35.21% 35.43% +0.21%
==========================================
Files 645 646 +1
Lines 44885 44988 +103
==========================================
+ Hits 15806 15940 +134
+ Misses 27847 27798 -49
- Partials 1232 1250 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
457a70f
to
359761b
Compare
e2dcc2c
to
9d7fdd9
Compare
9d7fdd9
to
e3c9bfc
Compare
d20e47c
to
8c2d31e
Compare
/retest |
All review comments have been resolved. To facilitate the review process, I will rebase the commits before merging |
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.
/assign
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.
Generally looks good to me.
8c2d31e
to
2eb38a9
Compare
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.
/lgtm
Are you going to squash the commits? |
…from cpp Signed-off-by: zhzhuang-zju <[email protected]>
380f12d
to
69a07ed
Compare
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.
LGTM
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.
LGTM
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.
/lgtm
/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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
refer to #3845, pp will preempt cpp regardless of priority. And it will also clean up the labels used to mark cpp during the preemption process. However, currently only the labels are being cleaned up, and the annotations are being left behind. This results in the same resource having both the annotation marking pp and the annotation marking cpp, like
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
From a mechanism standpoint, only pp can preempt cpp. Therefore, there is no need to consider cleaning up pp's labels and annotations when applying ClusterPolicy.
Does this PR introduce a user-facing change?: