Skip to content

Commit 4d500ed

Browse files
committed
Enable k8s upgrade in slef hosted test
This enables the k8s upgrade that is part of the self hosted test. It was previously disabled since the dynamic installation of kubernetes components on the nodes made it hard to change the version in the middle of a test. Also updated the README tables for what versions are tested.
1 parent 3853737 commit 4d500ed

File tree

13 files changed

+134
-25
lines changed

13 files changed

+134
-25
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ e2e-templates: $(addprefix $(E2E_NO_ARTIFACT_TEMPLATES_DIR)/, \
165165
cluster-template-multi-network.yaml \
166166
cluster-template-without-lb.yaml \
167167
cluster-template.yaml \
168-
cluster-template-flatcar.yaml)
168+
cluster-template-flatcar.yaml \
169+
cluster-template-k8s-upgrade.yaml)
169170
# Currently no templates that require CI artifacts
170171
# $(addprefix $(E2E_TEMPLATES_DIR)/, add-templates-here.yaml) \
171172

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,28 @@ This provider's versions are compatible with the following versions of Cluster A
4848

4949
This provider's versions are able to install and manage the following versions of Kubernetes:
5050

51-
| | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 | v1.27 | v1.28 |
52-
|------------------------------------| ----- | ----- | ----- | ----- | ----- | ----- | ----- |
53-
| OpenStack Provider v1alpha5 (v0.6) | + ||| | + | + | + |
54-
| OpenStack Provider v1alpha6 (v0.7) | + ||| ||| + |
55-
| OpenStack Provider v1alpha7 | + | + | + | + | || |
51+
| | v1.25 | v1.26 | v1.27 | v1.28 |
52+
|------------------------------------| ----- | ----- | ----- | ----- |
53+
| OpenStack Provider v1alpha5 (v0.6) || + | + | + |
54+
| OpenStack Provider v1alpha6 (v0.7) |||| + |
55+
| OpenStack Provider v1alpha7 | + ||| |
5656

5757
This provider's versions are able to install Kubernetes to the following versions of OpenStack:
5858

5959
| | Queens | Rocky | Stein | Train | Ussuri | Victoria | Wallaby | Xena | Yoga |
6060
|------------------------------------| ------ | ----- | ----- | ----- | ------ | -------- | ------- | ---- | ---- |
61-
| OpenStack Provider v1alpha5 (v0.6) | + | + | + | + | + |||| |
62-
| OpenStack Provider v1alpha6 (v0.7) | + | + | + | + | + |||| |
63-
| OpenStack Provider v1alpha7 | | + | + | + | + |||| |
61+
| OpenStack Provider v1alpha5 (v0.6) | + | + | + | + | + |||| |
62+
| OpenStack Provider v1alpha6 (v0.7) | + | + | + | + | + |||| |
63+
| OpenStack Provider v1alpha7 | | + | + | + | + |||| |
6464

6565
Test status:
6666

67-
- `` tested
67+
- `` currently testing
68+
- `` previously tested
6869
- `+` should work, but we weren't able to test it
6970

71+
Older versions may also work but we have not verified.
72+
7073
Each version of Cluster API for OpenStack will attempt to support two Kubernetes versions.
7174

7275
**NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this

hack/ci/cloud-init/controller.yaml.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
# https://docs.openstack.org/glance/latest/admin/quotas.html
6363
IMAGE_URLS="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/amphora/2022-12-05/amphora-x64-haproxy.qcow2,"
6464
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/cirros/2022-12-05/cirros-0.6.1-x86_64-disk.img,"
65+
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/2023-09-29/ubuntu-2204-kube-v1.27.2.img,"
6566
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/ubuntu/2023-09-29/ubuntu-2204-kube-v1.28.2.img,"
6667
IMAGE_URLS+="https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/test/flatcar/flatcar-stable-3602.2.0-kube-v1.28.2.img"
6768

test/e2e/data/e2e_conf.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ variables:
165165
# used to ensure we deploy to the correct management cluster
166166
KUBE_CONTEXT: "kind-capo-e2e"
167167
KUBERNETES_VERSION: "v1.28.2"
168+
KUBERNETES_VERSION_UPGRADE_FROM: "v1.27.2"
169+
KUBERNETES_VERSION_UPGRADE_TO: "v1.28.2"
170+
ETCD_VERSION_UPGRADE_TO: "3.5.9-0"
171+
COREDNS_VERSION_UPGRADE_TO: "v1.10.1"
172+
CONTROL_PLANE_MACHINE_TEMPLATE_UPGRADE_TO: "upgrade-to-control-plane"
173+
WORKERS_MACHINE_TEMPLATE_UPGRADE_TO: "upgrade-to-md-0"
168174
CNI: "../../data/cni/calico.yaml"
169175
CCM: "../../data/ccm/cloud-controller-manager.yaml"
170176
EXP_CLUSTER_RESOURCE_SET: "true"
@@ -179,6 +185,7 @@ variables:
179185
OPENSTACK_FAILURE_DOMAIN: "testaz1"
180186
OPENSTACK_FAILURE_DOMAIN_ALT: "testaz2"
181187
OPENSTACK_IMAGE_NAME: "ubuntu-2204-kube-v1.28.2"
188+
OPENSTACK_IMAGE_NAME_UPGRADE_FROM: "ubuntu-2204-kube-v1.27.2"
182189
OPENSTACK_NODE_MACHINE_FLAVOR: "m1.small"
183190
OPENSTACK_SSH_KEY_NAME: "cluster-api-provider-openstack-sigs-k8s-io"
184191
OPENSTACK_EXTERNAL_NETWORK_ID: ""

test/e2e/data/kustomize/common-patches/ccm/kustomization.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ kind: Component
66
resources:
77
- ccm.yaml
88

9-
patchesStrategicMerge:
10-
- patch-ccm.yaml
11-
129
patches:
1310
- target:
1411
kind: OpenStackCluster
@@ -18,3 +15,4 @@ patches:
1815
kind: KubeadmControlPlane
1916
name: \${CLUSTER_NAME}-control-plane
2017
path: patch-ccm-cloud-config.yaml
18+
- path: patch-ccm.yaml

test/e2e/data/kustomize/common-patches/cni/kustomization.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ kind: Component
66
resources:
77
- cni.yaml
88

9-
patchesStrategicMerge:
10-
- patch-cni.yaml
11-
129
patches:
1310
- target:
1411
kind: OpenStackCluster
1512
name: \${CLUSTER_NAME}
1613
path: patch-cluster.yaml
14+
- path: patch-cni.yaml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
2+
kind: KubeadmControlPlane
3+
metadata:
4+
name: ${CLUSTER_NAME}-control-plane
5+
spec:
6+
machineTemplate:
7+
infrastructureRef:
8+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
9+
kind: OpenStackMachineTemplate
10+
name: ${CLUSTER_NAME}-upgrade-from-control-plane
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
resources:
3+
- ../default
4+
- upgrade-from-template.yaml
5+
- upgrade-to-template.yaml
6+
7+
patches:
8+
- path: kcp-patch.yaml
9+
- path: md-patch.yaml
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: cluster.x-k8s.io/v1beta1
2+
kind: MachineDeployment
3+
metadata:
4+
name: ${CLUSTER_NAME}-md-0
5+
spec:
6+
template:
7+
spec:
8+
infrastructureRef:
9+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
10+
kind: OpenStackMachineTemplate
11+
name: ${CLUSTER_NAME}-upgrade-from-md-0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
3+
kind: OpenStackMachineTemplate
4+
metadata:
5+
name: ${CLUSTER_NAME}-upgrade-from-control-plane
6+
spec:
7+
template:
8+
spec:
9+
cloudName: ${OPENSTACK_CLOUD}
10+
flavor: ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR}
11+
identityRef:
12+
kind: Secret
13+
name: ${CLUSTER_NAME}-cloud-config
14+
image: ${OPENSTACK_IMAGE_NAME_UPGRADE_FROM}
15+
sshKeyName: ${OPENSTACK_SSH_KEY_NAME}
16+
tags:
17+
- control-plane
18+
---
19+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7
20+
kind: OpenStackMachineTemplate
21+
metadata:
22+
name: ${CLUSTER_NAME}-upgrade-from-md-0
23+
spec:
24+
template:
25+
spec:
26+
cloudName: ${OPENSTACK_CLOUD}
27+
flavor: ${OPENSTACK_NODE_MACHINE_FLAVOR}
28+
identityRef:
29+
kind: Secret
30+
name: ${CLUSTER_NAME}-cloud-config
31+
image: ${OPENSTACK_IMAGE_NAME_UPGRADE_FROM}
32+
sshKeyName: ${OPENSTACK_SSH_KEY_NAME}
33+
tags:
34+
- machine

0 commit comments

Comments
 (0)