Skip to content

[test] support cluster-api style rolling replacement upgrade #20804

@ahrtr

Description

@ahrtr

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.

func DowngradeUpgradeMembers(t *testing.T, lg *zap.Logger, clus *EtcdProcessCluster, numberOfMembersToChange int, downgradeEnabled bool, currentVersion, targetVersion *semver.Version) error {

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions