Skip to content

Commit a8c2a59

Browse files
authored
Merge pull request #2561 from Nordix/lentzi90/release-0.12-clusterctl-upgrade
🌱 E2E: clusterctl-upgrade from v0.10
2 parents 3de4d64 + 58416a3 commit a8c2a59

File tree

7 files changed

+82
-15
lines changed

7 files changed

+82
-15
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,15 @@ E2E_NO_ARTIFACT_TEMPLATES_DIR=test/e2e/data/infrastructure-openstack-no-artifact
177177
e2e-templates: ## Generate cluster templates for e2e tests
178178
e2e-templates: $(addprefix $(E2E_NO_ARTIFACT_TEMPLATES_DIR)/, \
179179
cluster-template-v1alpha7.yaml \
180+
cluster-template-without-orc.yaml \
180181
cluster-template-md-remediation.yaml \
181182
cluster-template-kcp-remediation.yaml \
182183
cluster-template-multi-az.yaml \
183184
cluster-template-multi-network.yaml \
184185
cluster-template-without-lb.yaml \
185186
cluster-template.yaml \
186187
cluster-template-flatcar.yaml \
187-
cluster-template-k8s-upgrade.yaml \
188+
cluster-template-k8s-upgrade.yaml \
188189
cluster-template-flatcar-sysext.yaml \
189190
cluster-template-no-bastion.yaml)
190191
# Currently no templates that require CI artifacts

test/e2e/data/e2e_conf.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
managementClusterName: capo-e2e
88

99
images:
10-
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.9.3
10+
- name: registry.k8s.io/cluster-api/cluster-api-controller:v1.9.7
1111
loadBehavior: tryLoad
12-
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.9.3
12+
- name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.9.7
1313
loadBehavior: tryLoad
14-
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.9.3
14+
- name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.9.7
1515
loadBehavior: tryLoad
1616
# Use local dev images built source tree;
1717
- name: gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:e2e
@@ -23,8 +23,8 @@ providers:
2323
- name: cluster-api
2424
type: CoreProvider
2525
versions:
26-
- name: v1.9.3
27-
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.3/core-components.yaml"
26+
- name: v1.9.7
27+
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.7/core-components.yaml"
2828
type: url
2929
contract: v1beta1
3030
files:
@@ -49,8 +49,8 @@ providers:
4949
- name: kubeadm
5050
type: BootstrapProvider
5151
versions:
52-
- name: v1.9.3
53-
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.3/bootstrap-components.yaml"
52+
- name: v1.9.7
53+
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.7/bootstrap-components.yaml"
5454
type: url
5555
contract: v1beta1
5656
files:
@@ -75,8 +75,8 @@ providers:
7575
- name: kubeadm
7676
type: ControlPlaneProvider
7777
versions:
78-
- name: v1.9.3
79-
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.3/control-plane-components.yaml"
78+
- name: v1.9.7
79+
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.9.7/control-plane-components.yaml"
8080
type: url
8181
contract: v1beta1
8282
files:
@@ -102,8 +102,8 @@ providers:
102102
type: InfrastructureProvider
103103
versions:
104104
# This is only for clusterctl upgrade tests
105-
- name: v0.9.0
106-
value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/v0.9.0/infrastructure-components.yaml"
105+
- name: v0.10.8
106+
value: "https://github.com/kubernetes-sigs/cluster-api-provider-openstack/releases/download/v0.10.8/infrastructure-components.yaml"
107107
type: url
108108
contract: v1beta1
109109
files:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: openstack.k-orc.cloud/v1alpha1
2+
kind: Image
3+
metadata:
4+
name: node-image
5+
spec:
6+
import:
7+
filter:
8+
name: ${OPENSTACK_IMAGE_NAME}
9+
managementPolicy: unmanaged
10+
cloudCredentialsRef:
11+
secretName: ${CLUSTER_NAME}-cloud-config
12+
cloudName: ${OPENSTACK_CLOUD}
13+
---
14+
apiVersion: openstack.k-orc.cloud/v1alpha1
15+
kind: Image
16+
metadata:
17+
name: bastion-image
18+
spec:
19+
import:
20+
filter:
21+
name: ${OPENSTACK_BASTION_IMAGE_NAME}
22+
managementPolicy: unmanaged
23+
cloudCredentialsRef:
24+
secretName: ${CLUSTER_NAME}-cloud-config
25+
cloudName: ${OPENSTACK_CLOUD}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
resources:
5+
- images.yaml
6+
7+
patches:
8+
- target:
9+
group: infrastructure.cluster.x-k8s.io
10+
version: v1beta1
11+
kind: OpenStackMachineTemplate
12+
patch: |-
13+
- op: replace
14+
path: /spec/template/spec/image
15+
value:
16+
filter:
17+
name: ${OPENSTACK_IMAGE_NAME}
18+
- target:
19+
group: infrastructure.cluster.x-k8s.io
20+
version: v1beta1
21+
kind: OpenStackCluster
22+
patch: |-
23+
- op: replace
24+
path: /spec/bastion/spec/image
25+
value:
26+
filter:
27+
name: ${OPENSTACK_BASTION_IMAGE_NAME}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../../../../../kustomize/v1beta1/default
6+
7+
components:
8+
- ../common-patches/cluster
9+
- ../common-patches/cni
10+
- ../upgrade-patches
11+
- ../common-patches/ccm
12+
- ../common-patches/externalNetworkByName
13+
- ../common-patches/images-without-ref

test/e2e/shared/defaults.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const (
5555
FlavorWithoutLB = "without-lb"
5656
FlavorMultiNetwork = "multi-network"
5757
FlavorMultiAZ = "multi-az"
58+
FlavorWithoutORC = "without-orc"
5859
FlavorV1alpha7 = "v1alpha7"
5960
FlavorMDRemediation = "md-remediation"
6061
FlavorKCPRemediation = "kcp-remediation"

test/e2e/suites/e2e/clusterctl_upgrade_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
const OldCAPIVersion = "v1.6.0"
3232

33-
var _ = Describe("When testing clusterctl upgrades (v0.9=>current) [clusterctl-upgrade]", func() {
33+
var _ = Describe("When testing clusterctl upgrades (v0.10=>current) [clusterctl-upgrade]", func() {
3434
BeforeEach(func(ctx context.Context) {
3535
shared.ApplyCoreImagesPlus(ctx, e2eCtx, upgradeImage)
3636

@@ -53,12 +53,12 @@ var _ = Describe("When testing clusterctl upgrades (v0.9=>current) [clusterctl-u
5353
SkipCleanup: false,
5454
InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/" + OldCAPIVersion + "/clusterctl-{OS}-{ARCH}",
5555
InitWithProvidersContract: "v1beta1",
56-
InitWithInfrastructureProviders: []string{"openstack:v0.9.0"},
56+
InitWithInfrastructureProviders: []string{"openstack:v0.10.8"},
5757
InitWithCoreProvider: "cluster-api:" + OldCAPIVersion,
5858
InitWithBootstrapProviders: []string{"kubeadm:" + OldCAPIVersion},
5959
InitWithControlPlaneProviders: []string{"kubeadm:" + OldCAPIVersion},
6060
MgmtFlavor: shared.FlavorDefault,
61-
WorkloadFlavor: shared.FlavorV1alpha7,
61+
WorkloadFlavor: shared.FlavorWithoutORC,
6262
InitWithKubernetesVersion: e2eCtx.E2EConfig.GetVariable(shared.KubernetesVersion),
6363
}
6464
})

0 commit comments

Comments
 (0)