-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support undo function of the kruise rollout object #78
Conversation
Welcome @myname4423! It looks like this is your first PR to openkruise/kruise-tools 🎉 |
@myname4423 Thanks for your contribution! Please signed off according to this doc |
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.
Can we use to-revision
flag in kruise rollout undo
? Such as kruise rollout undo rollout/abc to-revision 1
.
updatedAnnotations map[string]string, | ||
toRevision int64, | ||
dryRunStrategy cmdutil.DryRunStrategy) (string, error) { | ||
|
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.
can we move the checkrollout logic here, and construct and call the corresponding rollback for workload?
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.
I've updated the code this week with the following enhancements:
- Resources are now retrieved only once.
- Added deduplication logic.
- Enhanced error reporting for better clarity when undo operations fail.
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.
Mostly 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.
plz rebase the master so as to squash the commits
Signed-off-by: yunbo <yunbo10124scut@gmail.com> [temporary] temporary commit for sync Signed-off-by: yunbo <yunbo10124scut@gmail.com> [temporary] temporary commit for sync from local to work Signed-off-by: yunbo <yunbo10124scut@gmail.com> [temporary] temporary commit for sync from local to work Signed-off-by: yunbo <yunbo10124scut@gmail.com> rollout undo integration version2 Signed-off-by: yunbo <yunbo10124scut@gmail.com> update README.md Signed-off-by: yunbo <yunbo10124scut@gmail.com> remove the comment code Signed-off-by: yunbo <yunbo10124scut@gmail.com> hide the same-workload-error Signed-off-by: yunbo <yunbo10124scut@gmail.com> update README
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furykerry, hantmac 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 |
1.kubectl-kruise rollout undo命令现在可以支持kruise Rollout作为参数(args),Rollout对象可以作为rollout undo命令的入口,通过Rollout对象的WorkloadRef字段来获取其绑定的workload,然后对workload进行回滚。相比直接对工作负载进行回滚多了一次服务端访问