Skip to content

Commit ee4be02

Browse files
authored
Merge pull request #2831 from Nordix/lentzi90/cleanup-upgrade-image-patch
🌱 E2E: Cleanup upgrade patches
2 parents 24fee53 + 7f09f4f commit ee4be02

File tree

7 files changed

+20
-17
lines changed

7 files changed

+20
-17
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Modifications to release templates for self-hosted scenarios.
2+
# This patch allows the nodes dowload the CAPO image from E2E_IMAGE_URL,
3+
# and load it. It is useful when testing unpublished images (e.g. a PR).
4+
# The image is downloaded only if DOWNLOAD_E2E_IMAGE is set to true
5+
# when rendering the cluster template.
6+
apiVersion: kustomize.config.k8s.io/v1alpha1
7+
kind: Component
8+
9+
patches:
10+
- path: ci-hack-kcp.yaml
11+
target:
12+
kind: KubeadmControlPlane
13+
name: \${CLUSTER_NAME}-control-plane
14+
- path: ci-hack-kct.yaml
15+
target:
16+
kind: KubeadmConfigTemplate
17+
name: \${CLUSTER_NAME}-md-0

test/e2e/data/kustomize/components/upgrade-patches/kustomization.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/e2e/data/kustomize/default/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ resources:
77
components:
88
- ../components/cluster-resource-sets
99
- ../components/common
10-
- ../components/upgrade-patches
10+
- ../components/self-hosted

test/e2e/suites/e2e/clusterctl_upgrade_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ var (
4040

4141
var _ = Describe("When testing clusterctl upgrades for CAPO (v0.11=>current) and ORC (v1.0.2=>current) [clusterctl-upgrade]", func() {
4242
BeforeEach(func(ctx context.Context) {
43-
setDownloadE2EImageEnvVar()
4443
// Note: This gives the version without the 'v' prefix, so we need to add it below.
4544
capoRelease011, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.11")
4645
Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPO")
@@ -75,7 +74,6 @@ var _ = Describe("When testing clusterctl upgrades for CAPO (v0.11=>current) and
7574

7675
var _ = Describe("When testing clusterctl upgrades for CAPO (v0.12=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() {
7776
BeforeEach(func(ctx context.Context) {
78-
setDownloadE2EImageEnvVar()
7977
// Note: This gives the version without the 'v' prefix, so we need to add it below.
8078
capoRelease012, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.12")
8179
Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPO")
@@ -110,7 +108,6 @@ var _ = Describe("When testing clusterctl upgrades for CAPO (v0.12=>current) and
110108

111109
var _ = Describe("When testing clusterctl upgrades for CAPO (v0.13=>current) and ORC (v1.0.2=>current)[clusterctl-upgrade]", func() {
112110
BeforeEach(func(ctx context.Context) {
113-
setDownloadE2EImageEnvVar()
114111
// Note: This gives the version without the 'v' prefix, so we need to add it below.
115112
capoRelease013, err = clusterctl.ResolveRelease(ctx, "go://github.com/kubernetes-sigs/cluster-api-provider-openstack@v0.13")
116113
Expect(err).ToNot(HaveOccurred(), "failed to get stable release of CAPO")

test/e2e/suites/e2e/self_hosted_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import (
3030

3131
var _ = Describe("When testing Cluster API provider Openstack working on [self-hosted] clusters", func() {
3232
BeforeEach(func() {
33+
// The self-hosted cluster does not have the CAPO image loaded like the kind cluster does,
34+
// so we download it from E2E_IMAGE_URL.
3335
setDownloadE2EImageEnvVar()
3436
})
3537

0 commit comments

Comments
 (0)