diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index 5e253a8c76..b55f1180c5 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -42,7 +42,7 @@ This comes down to changing occurrences of the old version to the new version, e 4. Remove old `metadata.yaml`'s that are not used anymore in clusterctl upgrade tests. 4. Adjust cluster templates in `test/e2e/data/infrastructure-vsphere`: 1. Create a new `v1.7` folder. It should be created based on the `main` folder and only contain the templates - we use in the clusterctl upgrade tests (as of today `remote-management`). + we use in the clusterctl upgrade tests (as of today `topology`). 2. Remove old folders that are not used anymore in clusterctl upgrade tests. 3. Copy over the workload folder from a previous release. 5. Modify the test specs in `test/e2e/clusterctl_upgrade_test.go` (according to the versions we want to test described above). diff --git a/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go index 20b1ac50ba..e7b4d5f893 100644 --- a/test/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/clusterctl_upgrade_test.go @@ -90,7 +90,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.9= BootstrapClusterProxy: bootstrapClusterProxy, ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, - MgmtFlavor: testSpecificSettingsGetter().FlavorForMode("remote-management"), + MgmtFlavor: testSpecificSettingsGetter().FlavorForMode("topology"), PostNamespaceCreated: testSpecificSettingsGetter().PostNamespaceCreatedFunc, PreInit: vsphereframework.LoadImagesFunc(ctx), PreUpgrade: vsphereframework.LoadImagesFunc(ctx), diff --git a/test/framework/image_preloading.go b/test/framework/image_preloading.go index 957e3d1d18..dea54e3d73 100644 --- a/test/framework/image_preloading.go +++ b/test/framework/image_preloading.go @@ -49,7 +49,7 @@ func LoadImagesFunc(ctx context.Context) func(clusterProxy framework.ClusterProx } return func(clusterProxy framework.ClusterProxy) { - loader.loadImagesToCluster(ctx, clusterProxy) + loader.ImagesToCluster(ctx, clusterProxy) } } @@ -57,8 +57,8 @@ type imagePreloader struct { sourceFile string } -// loadImagesToCluster deploys a privileged daemonset and uses it to stream-load container images. -func (i imagePreloader) loadImagesToCluster(ctx context.Context, clusterProxy framework.ClusterProxy) { +// ImagesToCluster deploys a privileged daemonset and uses it to stream-load container images. +func (loader imagePreloader) ImagesToCluster(ctx context.Context, clusterProxy framework.ClusterProxy) { daemon, daemonMutateFn, daemonLabels := getPreloadDaemonset() ctrlClient := clusterProxy.GetClient() @@ -79,9 +79,10 @@ func (i imagePreloader) loadImagesToCluster(ctx context.Context, clusterProxy fr )).To(Succeed()) errs := []error{} - for _, pod := range pods.Items { - Byf("Loading images to node %s via pod %s", &pod.Spec.NodeName, klog.KObj(&pod)) - if err := i.loadImagesViaPod(ctx, clusterProxy, pod.Namespace, pod.Name, pod.Spec.Containers[0].Name); err != nil { + for j := range pods.Items { + pod := pods.Items[j] + Byf("Loading images to node %s via pod %s", pod.Spec.NodeName, klog.KObj(&pod)) + if err := loader.imagesViaPod(ctx, clusterProxy, pod.Namespace, pod.Name, pod.Spec.Containers[0].Name); err != nil { errs = append(errs, err) } } @@ -89,7 +90,7 @@ func (i imagePreloader) loadImagesToCluster(ctx context.Context, clusterProxy fr Expect(kerrors.NewAggregate(errs)).ToNot(HaveOccurred()) } -func (i imagePreloader) loadImagesViaPod(ctx context.Context, clusterProxy framework.ClusterProxy, namespace, podName, containerName string) error { +func (i imagePreloader) imagesViaPod(ctx context.Context, clusterProxy framework.ClusterProxy, namespace, podName, containerName string) error { // Open source tar file. reader, writer := io.Pipe() file, err := os.Open(i.sourceFile)