Skip to content

Commit

Permalink
Upgrade all the way from 1.25 to 1.28
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1999 committed Feb 15, 2024
1 parent 92e403d commit 067fdb6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/e2e/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ func runSimpleUpgradeFlowWorkerNodeVersionForBareMetal(test *framework.ClusterE2
test.ValidateHardwareDecommissioned()
}

func runInPlaceMultipleUpgradesFlow(test *framework.ClusterE2ETest, clusterOpts, clusterOpts2, clusterOpts3 []framework.ClusterE2ETestOpt) {
test.CreateCluster()
test.UpgradeClusterWithNewConfig(clusterOpts)
test.ValidateClusterState()
test.UpgradeClusterWithNewConfig(clusterOpts2)
test.ValidateClusterState()
test.UpgradeClusterWithNewConfig(clusterOpts3)
test.ValidateClusterState()
test.StopIfFailed()
test.DeleteCluster()
}

// runInPlaceUpgradeFlow makes use of the new ValidateClusterState method instead of ValidateCluster, but we should incorporate this
// in runSimpleUpgradeFlow itself.
func runInPlaceUpgradeFlow(test *framework.ClusterE2ETest, clusterOpts ...framework.ClusterE2ETestOpt) {
Expand Down
52 changes: 52 additions & 0 deletions test/e2e/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3599,6 +3599,58 @@ func TestVSphereKubernetes128UbuntuTo129InPlaceUpgrade_3CP_3Worker(t *testing.T)
)
}

func TestVSphereKubernetes125UbuntuTo128InPlaceUpgrade(t *testing.T) {
var kube126clusterOpts []framework.ClusterE2ETestOpt
var kube127clusterOpts []framework.ClusterE2ETestOpt
var kube128clusterOpts []framework.ClusterE2ETestOpt
provider := framework.NewVSphere(t, framework.WithUbuntu125())
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithEnvVar(features.VSphereInPlaceEnvVar, "true"),
).WithClusterConfig(
api.ClusterToConfigFiller(
api.WithKubernetesVersion(v1alpha1.Kube125),
api.WithStackedEtcdTopology(),
api.WithInPlaceUpgradeStrategy(),
),
api.VSphereToConfigFiller(
api.RemoveEtcdVsphereMachineConfig(),
),
provider.WithKubeVersionAndOS(v1alpha1.Kube125, framework.Ubuntu2004, nil),
)
kube126clusterOpts = append(
kube126clusterOpts,
framework.WithClusterUpgrade(
api.WithKubernetesVersion(v1alpha1.Kube126),
api.WithInPlaceUpgradeStrategy(),
),
provider.WithProviderUpgrade(provider.Ubuntu126Template()),
)
kube127clusterOpts = append(
kube127clusterOpts,
framework.WithClusterUpgrade(
api.WithKubernetesVersion(v1alpha1.Kube127),
api.WithInPlaceUpgradeStrategy(),
),
provider.WithProviderUpgrade(provider.Ubuntu127Template()),
)
kube128clusterOpts = append(
kube128clusterOpts,
framework.WithClusterUpgrade(
api.WithKubernetesVersion(v1alpha1.Kube128),
api.WithInPlaceUpgradeStrategy(),
),
provider.WithProviderUpgrade(provider.Ubuntu128Template()),
)
runInPlaceMultipleUpgradesFlow(
test,
kube126clusterOpts,
kube127clusterOpts,
kube128clusterOpts,
)
}

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

0 comments on commit 067fdb6

Please sign in to comment.