diff --git a/test/e2e/data/e2e_conf.yaml b/test/e2e/data/e2e_conf.yaml index 8d74e57969..0c384f0db7 100644 --- a/test/e2e/data/e2e_conf.yaml +++ b/test/e2e/data/e2e_conf.yaml @@ -154,6 +154,15 @@ providers: replacements: - old: "imagePullPolicy: Always" new: "imagePullPolicy: IfNotPresent" + # This is only for clusterctl upgrade tests, latest stable release of major version v1.0 + - name: v1.0.2 + value: ../../../../cluster-api-provider-openstack/test/infrastructure/openstack-resource-controller/config/upgrade-from + contract: v1beta1 + files: + - sourcePath: "../data/shared/openstack-resource-controller/metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" # default variables for the e2e test; those values could be overridden via env variables, thus diff --git a/test/e2e/suites/e2e/clusterctl_upgrade_test.go b/test/e2e/suites/e2e/clusterctl_upgrade_test.go index ec11037f1a..39e622761a 100644 --- a/test/e2e/suites/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/suites/e2e/clusterctl_upgrade_test.go @@ -36,7 +36,7 @@ var ( capiRelease19 string ) -var _ = Describe("When testing clusterctl upgrades (v0.11=>current) [clusterctl-upgrade]", func() { +var _ = Describe("When testing clusterctl upgrades for CAPO (v0.11=>current) and ORC (v1.0.2=>current) [clusterctl-upgrade]", func() { BeforeEach(func(ctx context.Context) { setDownloadE2EImageEnvVar() // Note: This gives the version without the 'v' prefix, so we need to add it below. @@ -51,25 +51,26 @@ var _ = Describe("When testing clusterctl upgrades (v0.11=>current) [clusterctl- capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput { return capi_e2e.ClusterctlUpgradeSpecInput{ - E2EConfig: e2eCtx.E2EConfig, - ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, - BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, - ArtifactFolder: e2eCtx.Settings.ArtifactFolder, - SkipCleanup: false, - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease19 + "/clusterctl-{OS}-{ARCH}", - InitWithProvidersContract: "v1beta1", - InitWithInfrastructureProviders: []string{"openstack:" + capoRelease011}, - InitWithCoreProvider: "cluster-api:" + capiRelease19, - InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease19}, - InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease19}, - MgmtFlavor: shared.FlavorDefault, - WorkloadFlavor: shared.FlavorDefault, - InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + E2EConfig: e2eCtx.E2EConfig, + ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, + BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, + ArtifactFolder: e2eCtx.Settings.ArtifactFolder, + SkipCleanup: false, + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease19 + "/clusterctl-{OS}-{ARCH}", + InitWithProvidersContract: "v1beta1", + InitWithInfrastructureProviders: []string{"openstack:" + capoRelease011}, + InitWithCoreProvider: "cluster-api:" + capiRelease19, + InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease19}, + InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease19}, + MgmtFlavor: shared.FlavorDefault, + WorkloadFlavor: shared.FlavorDefault, + InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + InitWithRuntimeExtensionProviders: []string{"openstack-resource-controller:v1.0.2"}, } }) }) -var _ = Describe("When testing clusterctl upgrades (v0.12=>current) [clusterctl-upgrade]", func() { +var _ = Describe("When testing clusterctl upgrades for CAPO (v0.12=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() { BeforeEach(func(ctx context.Context) { setDownloadE2EImageEnvVar() // Note: This gives the version without the 'v' prefix, so we need to add it below. @@ -84,20 +85,21 @@ var _ = Describe("When testing clusterctl upgrades (v0.12=>current) [clusterctl- capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput { return capi_e2e.ClusterctlUpgradeSpecInput{ - E2EConfig: e2eCtx.E2EConfig, - ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, - BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, - ArtifactFolder: e2eCtx.Settings.ArtifactFolder, - SkipCleanup: false, - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease19 + "/clusterctl-{OS}-{ARCH}", - InitWithProvidersContract: "v1beta1", - InitWithInfrastructureProviders: []string{"openstack:" + capoRelease012}, - InitWithCoreProvider: "cluster-api:" + capiRelease19, - InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease19}, - InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease19}, - MgmtFlavor: shared.FlavorDefault, - WorkloadFlavor: shared.FlavorDefault, - InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + E2EConfig: e2eCtx.E2EConfig, + ClusterctlConfigPath: e2eCtx.Environment.ClusterctlConfigPath, + BootstrapClusterProxy: e2eCtx.Environment.BootstrapClusterProxy, + ArtifactFolder: e2eCtx.Settings.ArtifactFolder, + SkipCleanup: false, + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + capiRelease19 + "/clusterctl-{OS}-{ARCH}", + InitWithProvidersContract: "v1beta1", + InitWithInfrastructureProviders: []string{"openstack:" + capoRelease012}, + InitWithCoreProvider: "cluster-api:" + capiRelease19, + InitWithBootstrapProviders: []string{"kubeadm:" + capiRelease19}, + InitWithControlPlaneProviders: []string{"kubeadm:" + capiRelease19}, + MgmtFlavor: shared.FlavorDefault, + WorkloadFlavor: shared.FlavorDefault, + InitWithKubernetesVersion: e2eCtx.E2EConfig.MustGetVariable(shared.KubernetesVersion), + InitWithRuntimeExtensionProviders: []string{"openstack-resource-controller:v1.0.2"}, } }) }) diff --git a/test/infrastructure/openstack-resource-controller/config/upgrade-from/kustomization.yaml b/test/infrastructure/openstack-resource-controller/config/upgrade-from/kustomization.yaml new file mode 100644 index 0000000000..23cecd5454 --- /dev/null +++ b/test/infrastructure/openstack-resource-controller/config/upgrade-from/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +labels: +# openstack-resource-controller is not a provider, but by adding this label +# we can get this installed by Cluster APIs Tiltfile and by the clusterctl machinery we use in E2E tests. +- pairs: + cluster.x-k8s.io/provider: "runtime-extension-openstack-resource-controller" + +resources: +# latest stable release of major version v1.0 +- https://github.com/k-orc/openstack-resource-controller/releases/download/v1.0.2/install.yaml