Skip to content

Commit

Permalink
Add e2e tests for inplace k8s upgrade to 1.29
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1999 committed Feb 15, 2024
1 parent 92e403d commit 68ef90b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/e2e/TINKERBELL_HARDWARE_COUNT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ TestTinkerbellSingleNode127To128UbuntuManagementCPUpgradeAPI: 4
TestTinkerbellKubernetes125UbuntuTo126InPlaceUpgrade_1CP_1Worker: 2
TestTinkerbellKubernetes126UbuntuTo127InPlaceUpgrade_1CP_2Worker: 3
TestTinkerbellKubernetes127UbuntuTo128InPlaceUpgrade_3CP_1Worker: 4
TestTinkerbellKubernetes128UbuntuTo129InPlaceUpgrade_2CP_2Worker: 4
TestTinkerbellKubernetes125UbuntuTo126SingleNodeInPlaceUpgrade: 1
TestTinkerbellKubernetes126UbuntuTo127SingleNodeInPlaceUpgrade: 1
TestTinkerbellKubernetes127UbuntuTo128SingleNodeInPlaceUpgrade: 1
TestTinkerbellKubernetes128UbuntuTo129SingleNodeInPlaceUpgrade: 1
TestTinkerbellKubernetes128UpgradeManagementComponents: 2
50 changes: 50 additions & 0 deletions test/e2e/tinkerbell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,27 @@ func TestTinkerbellKubernetes127UbuntuTo128InPlaceUpgrade_3CP_1Worker(t *testing
)
}

func TestTinkerbellKubernetes128UbuntuTo129InPlaceUpgrade_2CP_2Worker(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube128)),
framework.WithClusterFiller(api.WithControlPlaneCount(2)),
framework.WithClusterFiller(api.WithWorkerNodeCount(2)),
framework.WithClusterFiller(api.WithInPlaceUpgradeStrategy()),
framework.WithControlPlaneHardware(2),
framework.WithWorkerHardware(2),
).WithClusterConfig(
provider.WithKubeVersionAndOS(v1alpha1.Kube128, framework.Ubuntu2004, nil),
)
runInPlaceUpgradeFlowForBareMetal(
test,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube129), api.WithInPlaceUpgradeStrategy()),
provider.WithProviderUpgrade(framework.Ubuntu129Image()),
)
}

func TestTinkerbellKubernetes125UbuntuTo126SingleNodeInPlaceUpgrade(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
Expand Down Expand Up @@ -471,6 +492,35 @@ func TestTinkerbellKubernetes127UbuntuTo128SingleNodeInPlaceUpgrade(t *testing.T
)
}

func TestTinkerbellKubernetes128UbuntuTo129SingleNodeInPlaceUpgrade(t *testing.T) {
provider := framework.NewTinkerbell(t)
test := framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterSingleNode(v1alpha1.Kube128),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithEtcdCountIfExternal(0)),
framework.WithClusterFiller(api.RemoveAllWorkerNodeGroups()),
framework.WithClusterFiller(api.WithInPlaceUpgradeStrategy()),
framework.WithControlPlaneHardware(1),
).WithClusterConfig(
provider.WithKubeVersionAndOS(v1alpha1.Kube128, framework.Ubuntu2004, nil),
)
runInPlaceUpgradeFlowForBareMetal(
test,
framework.WithUpgradeClusterConfig(
api.ClusterToConfigFiller(
api.WithKubernetesVersion(v1alpha1.Kube129),
api.WithInPlaceUpgradeStrategy(),
),
api.TinkerbellToConfigFiller(
api.RemoveTinkerbellWorkerMachineConfig(),
),
),
provider.WithProviderUpgrade(framework.Ubuntu129Image()),
)
}

// Curated packages
func TestTinkerbellKubernetes127UbuntuSingleNodeCuratedPackagesFlow(t *testing.T) {
test := framework.NewClusterE2ETest(t,
Expand Down

0 comments on commit 68ef90b

Please sign in to comment.