etcd-io/etcd

[test] support cluster-api style rolling replacement upgrade

Open

#20.804 aberto em 15 de out. de 2025

Ver no GitHub
 (10 comments) (0 reactions) (2 assignees)Go (10.352 forks)batch import
area/testinghelp wantedstage/trackedtype/feature

Métricas do repositório

Stars
 (51.701 stars)
Métricas de merge de PR
 (Mesclagem média 6d 3h) (71 fundiu PRs em 30d)

Description

What would you like to be added?

Currently our e2e framework supports in-place upgrade. We just replace the binary, and reuse the existing data.

https://github.com/etcd-io/etcd/blob/30452ab110473eda5f60bdb301c046194a154e91/tests/framework/e2e/downgrade.go#L131

However, the cluster-api/Kubeadm upgrades Kubernetes cluster in a rolling replacement approach,

  • add a new learner first;
  • promote it later
  • remove an old node
  • repeat the above steps until all nodes are replaced.

The key difference is the new member(learner) gets started without local data, so it may receive a snapshot from the leader.

We should update our e2e test framework to support both upgrade approaches,

  • rolling in-place upgrade
  • rolling replacement upgrade

Why is this needed?

To improve test coverage.

Guia do colaborador