-
Notifications
You must be signed in to change notification settings - Fork 193
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
chore: switchover before updating or deleting pods #8731
Conversation
79187b1
to
f197612
Compare
a19a220
to
95b1c59
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8731 +/- ##
==========================================
+ Coverage 60.80% 61.34% +0.53%
==========================================
Files 377 378 +1
Lines 45615 46649 +1034
==========================================
+ Hits 27738 28616 +878
- Misses 15255 15373 +118
- Partials 2622 2660 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
95b1c59
to
cd659d6
Compare
If switchover action will be called in its controller, then IMO there's no need to call it in component controller. kubeblocks/controllers/apps/transformer_component_workload.go Lines 688 to 698 in 1ede668
|
// Defines the procedure for a controlled transition of a role to a new replica. | ||
// | ||
// +optional | ||
Switchover *kbappsv1.Action `json:"switchover,omitempty"` |
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.
Mark the original SwitchoverAction field as deprecated? Or remove it directly (as it's not implemented yet), currently these two fields appear confusing.
} | ||
return m | ||
}() | ||
lfa, err := lifecycle.New(its.Namespace, its.Name, its.Name, lifecycleActions, templateVars, pod) |
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.
Should the second parameter of lifecycle.New be clusterName?
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.
Fixed.
The its controller cannot handle scale-in/out changes currently. |
/approve |
/cherry-pick release-1.0-beta |
🤖 says: Error cherry-picking. |
🤖 says: |
/cherry-pick release-1.0-beta |
🤖 says: cherry pick action finished successfully 🎉! |
(cherry picked from commit fd21c31)
No description provided.