Skip to content

feat: support the EtcdMember Replacing workflow - #512

Merged
ahrtr merged 1 commit into
etcd-io:mainfrom
silentred:feat-replacing
Sep 16, 2026
Merged

ahrtr merged 1 commit into
etcd-io:mainfrom
silentred:feat-replacing

Conversation

@silentred

Copy link
Copy Markdown
Member

Fixes #473

  • Reset RecreateCount when marking a member Replacing.
  • Reuse member cleanup, retain the finalizer, and wait for Pod/PVC deletion before transitioning directly to Provisioning.
  • Add e2e test for Replacing workflow

/cc @ahrtr @nwnt @GunaKKIBM
FYI: r.markMemberReplacing() is reusable for Recreating workflow.

@kubernetes-prow
kubernetes-prow Bot requested review from ahrtr and nwnt September 16, 2026 07:41
@kubernetes-prow

Copy link
Copy Markdown

@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.

Details

In response to this:

Fixes #473

  • Reset RecreateCount when marking a member Replacing.
  • Reuse member cleanup, retain the finalizer, and wait for Pod/PVC deletion before transitioning directly to Provisioning.
  • Add e2e test for Replacing workflow

/cc @ahrtr @nwnt @GunaKKIBM
FYI: r.markMemberReplacing() is reusable for Recreating workflow.

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.

Comment thread internal/controller/etcdmember.go Outdated
Comment thread internal/controller/etcdmember.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment on lines +93 to +96
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
Signed-off-by: shenmu.wy <shenmu.wy@antfin.com>
@kubernetes-prow

Copy link
Copy Markdown

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr
ahrtr merged commit 4962ed6 into etcd-io:main Sep 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support the Replacing case

3 participants