|
40 | 40 | providerDockerPrefix = "docker:v%s" |
41 | 41 | ) |
42 | 42 |
|
| 43 | +var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.10=>v1.12=>current) [PR-Blocking] [ClusterClass]", Label("PR-Blocking", "ClusterClass"), func() { |
| 44 | + version := "1.10" |
| 45 | + stableRelease10, err := GetStableReleaseOfMinor(ctx, version) |
| 46 | + Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) |
| 47 | + |
| 48 | + version = "1.12" |
| 49 | + stableRelease12, err := GetStableReleaseOfMinor(ctx, version) |
| 50 | + Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) |
| 51 | + ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { |
| 52 | + return ClusterctlUpgradeSpecInput{ |
| 53 | + E2EConfig: e2eConfig, |
| 54 | + ClusterctlConfigPath: clusterctlConfigPath, |
| 55 | + BootstrapClusterProxy: bootstrapClusterProxy, |
| 56 | + ArtifactFolder: artifactFolder, |
| 57 | + SkipCleanup: skipCleanup, |
| 58 | + // Configuration for the initial provider deployment. |
| 59 | + InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease10), |
| 60 | + // We have to pin the providers because with `InitWithProvidersContract` the test would |
| 61 | + // use the latest version for the contract (which is the next minor for v1beta1). |
| 62 | + InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease10), |
| 63 | + InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease10)}, |
| 64 | + InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease10)}, |
| 65 | + InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease10)}, |
| 66 | + Upgrades: []ClusterctlUpgradeSpecInputUpgrade{ |
| 67 | + { |
| 68 | + WithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease12), |
| 69 | + CoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease12), |
| 70 | + BootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease12)}, |
| 71 | + ControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease12)}, |
| 72 | + InfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease12)}, |
| 73 | + }, |
| 74 | + { // Upgrade to latest contract version. |
| 75 | + Contract: clusterv1.GroupVersion.Version, |
| 76 | + PostUpgrade: func(proxy framework.ClusterProxy, namespace, clusterName string) { |
| 77 | + framework.ValidateCRDMigration(ctx, proxy, namespace, clusterName, |
| 78 | + crdShouldBeMigrated, clusterctlcluster.FilterClusterObjectsWithNameFilter(clusterName)) |
| 79 | + }, |
| 80 | + }, |
| 81 | + }, |
| 82 | + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. |
| 83 | + // When picking this version, please check also the list of versions known by the source Cluster API version (rif. test/infrastructure/kind/mapper.go). |
| 84 | + InitWithKubernetesVersion: "v1.33.0", |
| 85 | + WorkloadKubernetesVersion: "v1.33.0", |
| 86 | + MgmtFlavor: "topology", |
| 87 | + WorkloadFlavor: "topology", |
| 88 | + UseKindForManagementCluster: true, |
| 89 | + } |
| 90 | + }) |
| 91 | +}) |
| 92 | + |
43 | 93 | // Note: This test should be changed during "prepare main branch", it should test n-3 => current. |
44 | 94 | var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.10=>current) [ClusterClass]", Label("ClusterClass"), func() { |
45 | 95 | // Get n-3 latest stable release |
|
0 commit comments