From a3cf36310e24c65a67ad6a870c726f62726bdc12 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Fri, 5 Jul 2024 11:06:20 +0300 Subject: [PATCH 1/2] Add release-0.4 metadata Signed-off-by: Furkat Gofurov --- metadata.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metadata.yaml b/metadata.yaml index 011a4aa5..a4e66791 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -14,4 +14,7 @@ releaseSeries: contract: v1beta1 - major: 0 minor: 3 + contract: v1beta1 + - major: 0 + minor: 4 contract: v1beta1 \ No newline at end of file From ccc265e28315453027d721ad035832094e37b53d Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Fri, 5 Jul 2024 11:37:17 +0300 Subject: [PATCH 2/2] Bump to latest version in e2e setup Signed-off-by: Furkat Gofurov --- test/e2e/config/e2e_conf.yaml | 56 ++++++++++++++++++++++++++++++++--- test/e2e/e2e_suite_test.go | 4 +-- test/e2e/e2e_upgrade_test.go | 13 ++++++-- 3 files changed, 65 insertions(+), 8 deletions(-) diff --git a/test/e2e/config/e2e_conf.yaml b/test/e2e/config/e2e_conf.yaml index 530b6867..2b4257ff 100644 --- a/test/e2e/config/e2e_conf.yaml +++ b/test/e2e/config/e2e_conf.yaml @@ -1,9 +1,9 @@ managementClusterName: caprke2-e2e images: - - name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-bootstrap:v0.2.7 + - name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-bootstrap:v0.4.0 loadBehavior: tryLoad - - name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-controlplane:v0.2.7 + - name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-controlplane:v0.4.0 loadBehavior: tryLoad - name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-bootstrap:dev loadBehavior: mustLoad @@ -64,7 +64,31 @@ providers: new: "imagePullPolicy: IfNotPresent" - old: "--leader-elect" new: "--leader-elect=false" - - name: v0.3.99 + - name: "v0.3.0" + value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.3.0/control-plane-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - name: "v0.4.0" + value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.4.0/control-plane-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - name: v0.4.99 value: "../../../controlplane/config/default" contract: v1beta1 files: @@ -90,7 +114,31 @@ providers: new: "imagePullPolicy: IfNotPresent" - old: "--leader-elect" new: "--leader-elect=false" - - name: v0.3.99 + - name: "v0.3.0" + value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.3.0/bootstrap-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - name: "v0.4.0" + value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.4.0/bootstrap-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - name: v0.4.99 value: ../../../bootstrap/config/default contract: v1beta1 files: diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 461ff3e2..4b5cf7c6 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -241,8 +241,8 @@ func initBootstrapCluster(bootstrapClusterProxy framework.ClusterProxy, config * InfrastructureProviders: config.InfrastructureProviders(), IPAMProviders: config.IPAMProviders(), RuntimeExtensionProviders: config.RuntimeExtensionProviders(), - BootstrapProviders: []string{"rke2-bootstrap"}, - ControlPlaneProviders: []string{"rke2-control-plane"}, + BootstrapProviders: []string{"rke2-bootstrap:v0.4.0"}, + ControlPlaneProviders: []string{"rke2-control-plane:v0.4.0"}, LogFolder: filepath.Join(artifactFolder, "clusters", bootstrapClusterProxy.GetName()), }, config.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...) } diff --git a/test/e2e/e2e_upgrade_test.go b/test/e2e/e2e_upgrade_test.go index b9d5eeda..b834a304 100644 --- a/test/e2e/e2e_upgrade_test.go +++ b/test/e2e/e2e_upgrade_test.go @@ -115,12 +115,21 @@ var _ = Describe("Workload cluster creation", func() { ControlPlane: client.ObjectKeyFromObject(result.LegacyControlPlane), }, e2eConfig.GetIntervals(specName, "wait-control-plane")...) + By("Upgrading to v0.3.0 boostrap/controlplane provider version") + clusterctl.UpgradeManagementClusterAndWait(ctx, clusterctl.UpgradeManagementClusterAndWaitInput{ + ClusterProxy: bootstrapClusterProxy, + ClusterctlConfigPath: clusterctlConfigPath, + BootstrapProviders: []string{"rke2-bootstrap:v0.3.0"}, + ControlPlaneProviders: []string{"rke2-control-plane:v0.3.0"}, + LogFolder: clusterctlLogFolder, + }, e2eConfig.GetIntervals(specName, "wait-controllers")...) + By("Upgrading to current boostrap/controlplane provider version") clusterctl.UpgradeManagementClusterAndWait(ctx, clusterctl.UpgradeManagementClusterAndWaitInput{ ClusterProxy: bootstrapClusterProxy, ClusterctlConfigPath: clusterctlConfigPath, - BootstrapProviders: []string{"rke2-bootstrap:v0.3.99"}, - ControlPlaneProviders: []string{"rke2-control-plane:v0.3.99"}, + BootstrapProviders: []string{"rke2-bootstrap:v0.4.99"}, + ControlPlaneProviders: []string{"rke2-control-plane:v0.4.99"}, LogFolder: clusterctlLogFolder, }, e2eConfig.GetIntervals(specName, "wait-controllers")...)