Skip to content

Commit

Permalink
Add base InPlace upgrade flows for vSphere (#7584)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavmpandey08 authored Feb 15, 2024
1 parent 7543166 commit a95da7b
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions test/e2e/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3443,6 +3443,102 @@ func TestVSphereKubernetes127to128UpgradeFromLatestMinorReleaseBottleRocketAPI(t
)
}

func TestVSphereKubernetes125UbuntuTo126InPlaceUpgrade_1CP_1Worker(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu125())
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithEnvVar(features.VSphereInPlaceEnvVar, "true"),
).WithClusterConfig(
api.ClusterToConfigFiller(
api.WithControlPlaneCount(1),
api.WithWorkerNodeCount(1),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
api.VSphereToConfigFiller(api.RemoveEtcdVsphereMachineConfig()),
provider.WithKubeVersionAndOS(v1alpha1.Kube125, framework.Ubuntu2004, nil),
)

runInPlaceUpgradeFlow(
test,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube126)),
provider.WithProviderUpgrade(provider.Ubuntu126Template()),
)
}

func TestVSphereKubernetes126UbuntuTo127InPlaceUpgrade_3CP_1Worker(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu126())
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithEnvVar(features.VSphereInPlaceEnvVar, "true"),
).WithClusterConfig(
api.ClusterToConfigFiller(
api.WithControlPlaneCount(3),
api.WithWorkerNodeCount(1),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
api.VSphereToConfigFiller(api.RemoveEtcdVsphereMachineConfig()),
provider.WithKubeVersionAndOS(v1alpha1.Kube126, framework.Ubuntu2004, nil),
)

runInPlaceUpgradeFlow(
test,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube127)),
provider.WithProviderUpgrade(provider.Ubuntu127Template()),
)
}

func TestVSphereKubernetes127UbuntuTo128InPlaceUpgrade_1CP_3Worker(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu127())
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithEnvVar(features.VSphereInPlaceEnvVar, "true"),
).WithClusterConfig(
api.ClusterToConfigFiller(
api.WithControlPlaneCount(1),
api.WithWorkerNodeCount(3),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
api.VSphereToConfigFiller(api.RemoveEtcdVsphereMachineConfig()),
provider.WithKubeVersionAndOS(v1alpha1.Kube127, framework.Ubuntu2004, nil),
)

runInPlaceUpgradeFlow(
test,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube128)),
provider.WithProviderUpgrade(provider.Ubuntu128Template()),
)
}

func TestVSphereKubernetes128UbuntuTo129InPlaceUpgrade_3CP_3Worker(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu128())
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithEnvVar(features.VSphereInPlaceEnvVar, "true"),
).WithClusterConfig(
api.ClusterToConfigFiller(
api.WithControlPlaneCount(3),
api.WithWorkerNodeCount(3),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
api.VSphereToConfigFiller(api.RemoveEtcdVsphereMachineConfig()),
provider.WithKubeVersionAndOS(v1alpha1.Kube128, framework.Ubuntu2004, nil),
)

runInPlaceUpgradeFlow(
test,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube129)),
provider.WithProviderUpgrade(provider.Ubuntu129Template()),
)
}

func TestVSphereKubernetes128UbuntuInPlaceCPScaleUp1To3(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu128())
test := framework.NewClusterE2ETest(
Expand Down

0 comments on commit a95da7b

Please sign in to comment.