|
34 | 34 | providerDockerPrefix = "docker:v%s"
|
35 | 35 | )
|
36 | 36 |
|
| 37 | +var _ = Describe("When testing clusterctl upgrades (v0.4=>v1.6=>current) [PR-Blocking]", func() { |
| 38 | + // Get v0.4 latest stable release |
| 39 | + version04 := "0.4" |
| 40 | + stableRelease04, err := GetStableReleaseOfMinor(ctx, version04) |
| 41 | + Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version04) |
| 42 | + |
| 43 | + // Get v1.6 latest stable release |
| 44 | + version16 := "1.6" |
| 45 | + stableRelease16, err := GetStableReleaseOfMinor(ctx, version16) |
| 46 | + Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version16) |
| 47 | + |
| 48 | + ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { |
| 49 | + return ClusterctlUpgradeSpecInput{ |
| 50 | + E2EConfig: e2eConfig, |
| 51 | + ClusterctlConfigPath: clusterctlConfigPath, |
| 52 | + BootstrapClusterProxy: bootstrapClusterProxy, |
| 53 | + ArtifactFolder: artifactFolder, |
| 54 | + SkipCleanup: skipCleanup, |
| 55 | + InfrastructureProvider: ptr.To("docker"), |
| 56 | + // ### Versions for the initial deployment of providers ### |
| 57 | + InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease04), |
| 58 | + InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease04), |
| 59 | + InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease04)}, |
| 60 | + InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease04)}, |
| 61 | + InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease04)}, |
| 62 | + InitWithRuntimeExtensionProviders: []string{}, |
| 63 | + // ### Versions for the first upgrade of providers ### // FIXME: move upgrades to slice & add hook |
| 64 | + UpgradeWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease16), |
| 65 | + CoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease16), |
| 66 | + BootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease16)}, |
| 67 | + ControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease16)}, |
| 68 | + InfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease16)}, |
| 69 | + RuntimeExtensionProviders: []string{}, |
| 70 | + // Run a final upgrade to latest |
| 71 | + AdditionalUpgrade: true, |
| 72 | + |
| 73 | + // Some notes about the version pinning: (FIXME) |
| 74 | + // We have to pin the providers because with `InitWithProvidersContract` the test would |
| 75 | + // use the latest version for the contract (which is v1.6.X for v1beta1). |
| 76 | + // We have to set this to an empty array as clusterctl v1.0 doesn't support |
| 77 | + // runtime extension providers. If we don't do this the test will automatically |
| 78 | + // try to deploy the latest version of our test-extension from docker.yaml. |
| 79 | + |
| 80 | + // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v1.0/bases. |
| 81 | + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. |
| 82 | + InitWithKubernetesVersion: "v1.23.17", |
| 83 | + WorkloadKubernetesVersion: "v1.23.17", |
| 84 | + MgmtFlavor: "topology", |
| 85 | + WorkloadFlavor: "", |
| 86 | + } |
| 87 | + }) |
| 88 | +}) |
| 89 | + |
37 | 90 | var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() {
|
38 | 91 | // Get v1.0 latest stable release
|
39 | 92 | version := "1.0"
|
|
0 commit comments