feat: support the EtcdMember Replacing workflow - #512
Conversation
|
@silentred: GitHub didn't allow me to request PR reviews from the following users: GunaKKIBM. Note that only etcd-io members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
🟡 Changes recommended
Add unit coverage verifying RecreateCount resets from a nonzero value.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds the EtcdMember Replacing workflow, preserving the member while cleaning up resources before reprovisioning.
Changes:
- Implements replacement reconciliation and cleanup.
- Retains the finalizer and waits for Pod/PVC deletion.
- Adds unit and end-to-end replacement coverage.
File summaries
| File | Summary |
|---|---|
test/e2e/e2e_test.go |
Verifies the replacement workflow and recreated resources. |
internal/controller/etcdmember.go |
Implements replacement cleanup and provisioning transition. |
internal/controller/etcdmember_test.go |
Tests cleanup sequencing and finalizer retention; add coverage for resetting a nonzero RecreateCount. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| func (r *EtcdClusterReconciler) markMemberReplacing(ctx context.Context, member *ecv1alpha1.EtcdMember) error { | ||
| return r.updateEtcdMemberStatus(ctx, member, func(status *ecv1alpha1.EtcdMemberStatus) { | ||
| status.Phase = ecv1alpha1.EtcdMemberReplacing | ||
| status.RecreateCount = 0 |
1a104b8 to
d35e368
Compare
Signed-off-by: shenmu.wy <shenmu.wy@antfin.com>
d35e368 to
073edc8
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, silentred The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #473
/cc @ahrtr @nwnt @GunaKKIBM
FYI:
r.markMemberReplacing()is reusable forRecreatingworkflow.