Skip to content

Commit 0d5dc96

Browse files
Merge pull request #2560 from Nordix/update-clusterclt-main-1-10/adil
🌱 Updating main branch clusterctl tests
2 parents 6a3caa6 + 3027a41 commit 0d5dc96

File tree

5 files changed

+70
-20
lines changed

5 files changed

+70
-20
lines changed

scripts/ci-e2e.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ source "${M3_DEV_ENV_PATH}/lib/ironic_tls_setup.sh"
101101
BMO_OVERLAYS=(
102102
"${REPO_ROOT}/test/e2e/data/bmo-deployment/overlays/release-0.8"
103103
"${REPO_ROOT}/test/e2e/data/bmo-deployment/overlays/release-0.9"
104+
"${REPO_ROOT}/test/e2e/data/bmo-deployment/overlays/release-0.10"
104105
"${REPO_ROOT}/test/e2e/data/bmo-deployment/overlays/release-latest"
105106
)
106107
IRONIC_OVERLAYS=(
107108
"${REPO_ROOT}/test/e2e/data/ironic-deployment/overlays/release-26.0"
108109
"${REPO_ROOT}/test/e2e/data/ironic-deployment/overlays/release-27.0"
110+
"${REPO_ROOT}/test/e2e/data/ironic-deployment/overlays/release-29.0"
109111
"${REPO_ROOT}/test/e2e/data/ironic-deployment/overlays/release-latest"
110112
)
111113

test/e2e/common.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ const (
6868
oostRemoved = "removed"
6969
)
7070

71-
var releaseMarkerPrefix = "go://github.com/metal3-io/cluster-api-provider-metal3@v%s"
72-
7371
func Byf(format string, a ...interface{}) {
7472
By(fmt.Sprintf(format, a...))
7573
}
@@ -772,7 +770,7 @@ func LabelCRD(ctx context.Context, c client.Client, crdName string, labels map[s
772770
}
773771

774772
// GetCAPM3StableReleaseOfMinor returns latest stable version of minorRelease.
775-
func GetCAPM3StableReleaseOfMinor(ctx context.Context, minorRelease string) (string, error) {
773+
func GetStableReleaseOfMinor(ctx context.Context, releaseMarkerPrefix string, minorRelease string) (string, error) {
776774
releaseMarker := fmt.Sprintf(releaseMarkerPrefix, minorRelease)
777775
return clusterctl.ResolveRelease(ctx, releaseMarker)
778776
}

test/e2e/config/e2e_conf.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@ providers:
143143
targetName: "cluster-template-ubuntu.yaml"
144144
- sourcePath: "../_out/cluster-template-upgrade-workload.yaml"
145145
targetName: "cluster-template-upgrade-workload.yaml"
146+
- name: "{go://github.com/metal3-io/[email protected]}"
147+
value: "https://github.com/metal3-io/cluster-api-provider-metal3/releases/download/{go://github.com/metal3-io/[email protected]}/infrastructure-components.yaml"
148+
type: "url"
149+
contract: v1beta1
150+
files:
151+
- sourcePath: "../data/infrastructure-metal3/v1.10/metadata.yaml"
152+
targetName: "metadata.yaml"
153+
- sourcePath: "../_out/cluster-template-ubuntu.yaml"
154+
targetName: "cluster-template-ubuntu.yaml"
155+
- sourcePath: "../_out/cluster-template-upgrade-workload.yaml"
156+
targetName: "cluster-template-upgrade-workload.yaml"
146157
- name: v1.11.99
147158
value: "${PWD}/config/default"
148159
files:
@@ -219,9 +230,11 @@ variables:
219230
NODE_DRAIN_TIMEOUT: "0s"
220231
IRONIC_RELEASE_26.0: "data/ironic-deployment/overlays/release-26.0"
221232
IRONIC_RELEASE_27.0: "data/ironic-deployment/overlays/release-27.0"
233+
IRONIC_RELEASE_29.0: "data/ironic-deployment/overlays/release-29.0"
222234
IRONIC_RELEASE_LATEST: "data/ironic-deployment/overlays/release-latest"
223235
BMO_RELEASE_0.8: "data/bmo-deployment/overlays/release-0.8"
224236
BMO_RELEASE_0.9: "data/bmo-deployment/overlays/release-0.9"
237+
BMO_RELEASE_0.10: "data/bmo-deployment/overlays/release-0.10"
225238
BMO_RELEASE_LATEST: "data/bmo-deployment/overlays/release-latest"
226239
FKAS_RELEASE_LATEST: "data/fkas"
227240

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
2+
kind: Metadata
3+
releaseSeries:
4+
- major: 1
5+
minor: 10
6+
contract: v1beta1
7+
- major: 1
8+
minor: 9
9+
contract: v1beta1
10+
- major: 1
11+
minor: 8
12+
contract: v1beta1
13+
- major: 1
14+
minor: 7
15+
contract: v1beta1
16+
- major: 1
17+
minor: 6
18+
contract: v1beta1
19+
- major: 1
20+
minor: 5
21+
contract: v1beta1
22+
- major: 1
23+
minor: 4
24+
contract: v1beta1
25+
- major: 1
26+
minor: 3
27+
contract: v1beta1
28+
- major: 1
29+
minor: 2
30+
contract: v1beta1
31+
- major: 1
32+
minor: 1
33+
contract: v1beta1
34+
- major: 1
35+
minor: 0
36+
contract: v1beta1

test/e2e/upgrade_clusterctl_test.go

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ import (
2121
)
2222

2323
const (
24-
workDir = "/opt/metal3-dev-env/"
25-
contract = "v1beta1"
24+
workDir = "/opt/metal3-dev-env/"
25+
contract = "v1beta1"
26+
releaseMarkerPrefixCAPM3 = "go://github.com/metal3-io/cluster-api-provider-metal3@v%s"
27+
releaseMarkerPrefixIPAM = "go://github.com/metal3-io/ip-address-manager@v%s"
2628
)
2729

2830
var (
@@ -36,7 +38,7 @@ var (
3638
k8sVersion string
3739
)
3840

39-
var _ = Describe("When testing cluster upgrade from releases (v1.9=>current) [clusterctl-upgrade]", func() {
41+
var _ = Describe("When testing cluster upgrade from releases (v1.10=>current) [clusterctl-upgrade]", func() {
4042
BeforeEach(func() {
4143
k8sVersion = "v1.33.0"
4244
validateGlobals(specName)
@@ -46,15 +48,17 @@ var _ = Describe("When testing cluster upgrade from releases (v1.9=>current) [cl
4648
clusterctlLogFolder = filepath.Join(artifactFolder, bootstrapClusterProxy.GetName())
4749
})
4850

49-
minorVersion := "1.9"
50-
bmoFromRelease := "0.9"
51-
ironicFromRelease := "27.0"
51+
minorVersion := "1.10"
52+
bmoFromRelease := "0.10"
53+
ironicFromRelease := "29.0"
5254
bmoToRelease := "latest"
5355
ironicToRelease := "latest"
5456
capiStableRelease, err := capi_e2e.GetStableReleaseOfMinor(ctx, minorVersion)
5557
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for CAPI minor release : %s", minorVersion)
56-
capm3StableRelease, err := GetCAPM3StableReleaseOfMinor(ctx, minorVersion)
58+
capm3StableRelease, err := GetStableReleaseOfMinor(ctx, releaseMarkerPrefixCAPM3, minorVersion)
5759
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for CAPM3 minor release : %s", minorVersion)
60+
ipamStableRelease, err := GetStableReleaseOfMinor(ctx, releaseMarkerPrefixIPAM, minorVersion)
61+
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for IPAM minor release : %s", minorVersion)
5862

5963
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
6064
return capi_e2e.ClusterctlUpgradeSpecInput{
@@ -67,7 +71,7 @@ var _ = Describe("When testing cluster upgrade from releases (v1.9=>current) [cl
6771
InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, capiStableRelease)},
6872
InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, capiStableRelease)},
6973
InitWithInfrastructureProviders: []string{fmt.Sprintf(providerMetal3Prefix, capm3StableRelease)},
70-
InitWithIPAMProviders: []string{""}, // Explicitly set to empty since we use the IPAM bundled with CAPM3.
74+
InitWithIPAMProviders: []string{fmt.Sprintf(providerMetal3Prefix, ipamStableRelease)},
7175
InitWithKubernetesVersion: k8sVersion,
7276
WorkloadKubernetesVersion: k8sVersion,
7377
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, capiStableRelease),
@@ -82,9 +86,6 @@ var _ = Describe("When testing cluster upgrade from releases (v1.9=>current) [cl
8286
PreUpgrade: func(clusterProxy framework.ClusterProxy) {
8387
preUpgrade(clusterProxy, bmoToRelease, ironicToRelease)
8488
},
85-
PostUpgrade: func(clusterProxy framework.ClusterProxy, _ string, _ string) {
86-
postUpgrade(ctx, clusterProxy)
87-
},
8889
PreCleanupManagementCluster: func(clusterProxy framework.ClusterProxy) {
8990
preCleanupManagementCluster(clusterProxy, ironicToRelease)
9091
},
@@ -94,24 +95,24 @@ var _ = Describe("When testing cluster upgrade from releases (v1.9=>current) [cl
9495
})
9596
})
9697

97-
var _ = Describe("When testing cluster upgrade from releases (v1.8=>current) [clusterctl-upgrade]", func() {
98+
var _ = Describe("When testing cluster upgrade from releases (v1.9=>current) [clusterctl-upgrade]", func() {
9899
BeforeEach(func() {
99-
k8sVersion = "v1.31.2"
100+
k8sVersion = "v1.33.0"
100101
validateGlobals(specName)
101102
imageURL, imageChecksum := EnsureImage(k8sVersion)
102103
os.Setenv("IMAGE_RAW_CHECKSUM", imageChecksum)
103104
os.Setenv("IMAGE_RAW_URL", imageURL)
104105
clusterctlLogFolder = filepath.Join(artifactFolder, bootstrapClusterProxy.GetName())
105106
})
106107

107-
minorVersion := "1.8"
108-
bmoFromRelease := "0.8"
109-
ironicFromRelease := "26.0"
108+
minorVersion := "1.9"
109+
bmoFromRelease := "0.9"
110+
ironicFromRelease := "27.0"
110111
bmoToRelease := "latest"
111112
ironicToRelease := "latest"
112113
capiStableRelease, err := capi_e2e.GetStableReleaseOfMinor(ctx, minorVersion)
113114
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for CAPI minor release : %s", minorVersion)
114-
capm3StableRelease, err := GetCAPM3StableReleaseOfMinor(ctx, minorVersion)
115+
capm3StableRelease, err := GetStableReleaseOfMinor(ctx, releaseMarkerPrefixCAPM3, minorVersion)
115116
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for CAPM3 minor release : %s", minorVersion)
116117

117118
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {

0 commit comments

Comments
 (0)