Skip to content

Commit 3aceb90

Browse files
committed
test: build upgrade flavor
1 parent 79951b5 commit 3aceb90

File tree

7 files changed

+13
-6
lines changed

7 files changed

+13
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*.dylib
77
bin/*
88
test/external-crds
9-
test/e2e/frmwrk/artifacts
9+
test/e2e/frmwrk/data/clusterctl-templates/cluster-template-*.yaml
1010
_artifacts
1111
Dockerfile.cross
1212
.release

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,13 @@ E2E_DEFAULT_FLAVOR ?= "calico"
141141
# Can be something like: basic && !move
142142
E2E_LABEL_FILTER ?= ""
143143

144+
E2E_TEMPLATES := test/e2e/frmwrk/data/clusterctl-templates
144145
.PHONY: test-e2e
145146
test-e2e: manifests generate fmt vet ginkgo
146147
rm -rf $(ARTIFACTS)
147148

149+
$(KUSTOMIZE) build $(E2E_TEMPLATES)/upgrade --load-restrictor LoadRestrictionsNone > $(E2E_TEMPLATES)/cluster-template-upgrade.yaml
150+
148151
@METAL_API_URL=$(E2E_METAL_API_URL) \
149152
METAL_API_HMAC=$(E2E_METAL_API_HMAC) \
150153
METAL_API_HMAC_AUTH_TYPE=$(E2E_METAL_API_HMAC_AUTH_TYPE) \

test/e2e/frmwrk/cluster_upgrade_kubernetes_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var _ = Describe("Upgrade Kubernetes Cluster Version", Ordered, Label("upgrade")
4040
ControlPlaneMachineImage: e2eCtx.envOrVar("E2E_CONTROL_PLANE_MACHINE_IMAGE_PREFIX") + fromKubernetesVersion,
4141
ControlPlaneMachineCount: 1,
4242
WorkerMachineImage: e2eCtx.envOrVar("E2E_WORKER_MACHINE_IMAGE_PREFIX") + fromKubernetesVersion,
43-
WorkerMachineCount: 1,
43+
WorkerMachineCount: 0,
4444
})
4545
ec.SetupMetalStackPreconditions(ctx)
4646
ec.SetupNamespace(ctx)
@@ -66,8 +66,8 @@ var _ = Describe("Upgrade Kubernetes Cluster Version", Ordered, Label("upgrade")
6666
SkipCleanup: false,
6767
SkipConformanceTests: true,
6868
ControlPlaneMachineCount: ptr.To[int64](1),
69-
WorkerMachineCount: ptr.To[int64](1),
70-
Flavor: ptr.To(e2eCtx.Environment.Flavor),
69+
WorkerMachineCount: ptr.To[int64](0),
70+
Flavor: ptr.To("upgrade"),
7171
}
7272
})
7373

test/e2e/frmwrk/config/capi-e2e-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ providers:
124124
- sourcePath: "../../../../config/clusterctl-templates/cluster-template.yaml"
125125
- sourcePath: "../../../../config/clusterctl-templates/cluster-template-calico.yaml"
126126
- sourcePath: "../../../../config/clusterctl-templates/cluster-template-pre-v1.33.yaml"
127-
- sourcePath: "../../../../config/clusterctl-templates/cluster-template-mt-control-plane-upgrade-to.yaml"
128-
- sourcePath: "../../../../config/clusterctl-templates/cluster-template-mt-worker-upgrade-to.yaml"
127+
- sourcePath: "../data/clusterctl-templates/cluster-template-upgrade.yaml"
129128
replacements:
130129
- old: --metrics-addr=127.0.0.1:8080
131130
new: --metrics-addr=:8080

config/clusterctl-templates/cluster-template-mt-control-plane-upgrade-to.yaml renamed to test/e2e/frmwrk/data/clusterctl-templates/bases/cluster-template-mt-control-plane-upgrade-to.yaml

File renamed without changes.

config/clusterctl-templates/cluster-template-mt-worker-upgrade-to.yaml renamed to test/e2e/frmwrk/data/clusterctl-templates/bases/cluster-template-mt-worker-upgrade-to.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
22
kind: MetalStackMachineTemplate
33
metadata:
44
name: k8s-upgrade-worker
5+
namespace: ${NAMESPACE}
56
spec:
67
template:
78
spec:
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resources:
2+
- ../../../../../../config/clusterctl-templates/cluster-template-calico.yaml
3+
- ../bases/cluster-template-mt-control-plane-upgrade-to.yaml
4+
- ../bases/cluster-template-mt-worker-upgrade-to.yaml

0 commit comments

Comments
 (0)