-
Notifications
You must be signed in to change notification settings - Fork 891
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
guarantee the promotion can be rolled back safely #5601
Conversation
8bc6446
to
2577cb9
Compare
the result is like this: $ karmadactl --karmada-context karmada-apiserver promote deployment nginx3 -C member2
ResourceTemplate (default/nginx3) is created successfully
PropagationPolicy (default/nginx3-6d7f8d5f5b) is created successfully
Resource "apps/v1, Resource=deployments"(default/nginx3) is promoted successfully
$ kubectl get pp nginx3-6d7f8d5f5b -o jsonpath='{.spec.preserveResourcesOnDeletion}'
true#
$ karmadactl --karmada-context karmada-apiserver promote clusterrole pod-reader -C member2
ResourceTemplate (default/pod-reader) is created successfully
ClusterPropagationPolicy pod-reader-54499c54c is created successfully
Resource "rbac.authorization.k8s.io/v1, Resource=clusterroles"(pod-reader) is promoted successfully
$ kubectl get cpp pod-reader-54499c54c -o jsonpath='{.spec.preserveResourcesOnDeletion}'
true# |
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 @chaosi-zju
generally looks good, thanks Although it doesn't affect the functionality, I think we should proactively set |
Signed-off-by: wulemao <1194736083@qq.com>
2577cb9
to
7f082af
Compare
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 #5601 +/- ##
==========================================
+ Coverage 34.84% 35.05% +0.20%
==========================================
Files 645 645
Lines 44861 44869 +8
==========================================
+ Hits 15633 15727 +94
+ Misses 28021 27927 -94
- Partials 1207 1215 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
done |
/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.
cc @chaunceyjiang Would you like to take a look? This is the issue you care about. :)
Why do you think that? On the contrary, I think That is, we can leave conflictResolution unset(it will take the default |
What you said makes certain sense, but there are two problematic points:
|
Yeah, thanks for the reminder. Yes, we need
/lgtm |
[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 feature
What this PR does / why we need it:
Let
karmadactl promote
command leverage migration rollback feature to guarantee the promotion can be rolled back safely.To address the issue #3004 sent by @chaunceyjiang .
Which issue(s) this PR fixes:
Fixes part of #5577
Fixes #3004
Special notes for your reviewer:
Does this PR introduce a user-facing change?: