Skip to content

Commit

Permalink
Add base InPlace upgrade flows for vSphere
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavmpandey08 committed Feb 14, 2024
1 parent 29a7470 commit 2fac9e2
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/e2e/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package e2e
import (
"github.com/aws/eks-anywhere/internal/pkg/api"
"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/pkg/features"
"github.com/aws/eks-anywhere/test/framework"
)

Expand Down
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"),
framework.WithClusterFiller(
api.WithControlPlaneCount(1),
api.WithWorkerNodeCount(1),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
).WithClusterConfig(
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"),
framework.WithClusterFiller(
api.WithControlPlaneCount(3),
api.WithWorkerNodeCount(1),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
).WithClusterConfig(
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"),
framework.WithClusterFiller(
api.WithControlPlaneCount(1),
api.WithWorkerNodeCount(3),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
).WithClusterConfig(
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"),
framework.WithClusterFiller(
api.WithControlPlaneCount(3),
api.WithWorkerNodeCount(3),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
).WithClusterConfig(
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 2fac9e2

Please sign in to comment.