Skip to content

Commit add6d1c

Browse files
authored
Update the cluster templates with the latest changes added in cluster-api version 1.11.0-alpha.2 (#2414)
1 parent 8b98e0a commit add6d1c

18 files changed

+141
-136
lines changed

templates/bases/powervs/cluster.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ spec:
1414
cidrBlocks:
1515
- ${SERVICE_CIDR:="10.128.0.0/12"}
1616
infrastructureRef:
17-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
17+
apiGroup: infrastructure.cluster.x-k8s.io
1818
kind: IBMPowerVSCluster
1919
name: "${CLUSTER_NAME}"
2020
controlPlaneRef:
21-
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
21+
apiGroup: controlplane.cluster.x-k8s.io
2222
kind: KubeadmControlPlane
2323
name: "${CLUSTER_NAME}-control-plane"
2424
---

templates/bases/powervs/kcp.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
machineTemplate:
99
infrastructureRef:
1010
kind: IBMPowerVSMachineTemplate
11-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
11+
apiGroup: infrastructure.cluster.x-k8s.io
1212
name: "${CLUSTER_NAME}-control-plane"
1313
kubeadmConfigSpec:
1414
clusterConfiguration:
@@ -34,7 +34,6 @@ spec:
3434
discovery:
3535
bootstrapToken:
3636
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
37-
token: ""
3837
caCertHashes: [ ]
3938
unsafeSkipCAVerification: false
4039
nodeRegistration:

templates/bases/powervs/kubeadm-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ spec:
1111
discovery:
1212
bootstrapToken:
1313
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
14-
token: ""
1514
caCertHashes: []
1615
unsafeSkipCAVerification: false
1716
nodeRegistration:

templates/bases/powervs/md.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ spec:
1212
bootstrap:
1313
configRef:
1414
name: "${CLUSTER_NAME}-md-0"
15-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
15+
apiGroup: bootstrap.cluster.x-k8s.io
1616
kind: KubeadmConfigTemplate
1717
infrastructureRef:
1818
name: "${CLUSTER_NAME}-md-0"
19-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
19+
apiGroup: infrastructure.cluster.x-k8s.io
2020
kind: IBMPowerVSMachineTemplate
2121
---
2222
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2

templates/bases/vpc/cluster.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@ spec:
1515
cidrBlocks:
1616
- ${SERVICE_CIDR:="10.128.0.0/12"}
1717
infrastructureRef:
18-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
18+
apiGroup: infrastructure.cluster.x-k8s.io
1919
kind: IBMVPCCluster
2020
name: "${CLUSTER_NAME}"
21-
namespace: "${NAMESPACE}"
2221
controlPlaneRef:
23-
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
22+
apiGroup: controlplane.cluster.x-k8s.io
2423
kind: KubeadmControlPlane
2524
name: "${CLUSTER_NAME}-control-plane"
26-
namespace: "${NAMESPACE}"
2725
---
2826
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2927
kind: IBMVPCCluster

templates/bases/vpc/kcp.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ spec:
99
machineTemplate:
1010
infrastructureRef:
1111
kind: IBMVPCMachineTemplate
12-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
12+
apiGroup: infrastructure.cluster.x-k8s.io
1313
name: "${CLUSTER_NAME}-control-plane"
14-
namespace: "${NAMESPACE}"
1514
kubeadmConfigSpec:
1615
clusterConfiguration:
17-
kubernetesVersion: ${KUBERNETES_VERSION}
1816
controllerManager:
1917
extraArgs:
2018
- name: enable-hostpath-provisioner
@@ -23,7 +21,6 @@ spec:
2321
certSANs: [localhost, 127.0.0.1]
2422
dns: {}
2523
etcd: {}
26-
networking: {}
2724
scheduler: {}
2825
initConfiguration:
2926
nodeRegistration:

templates/bases/vpc/md.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ spec:
1212
bootstrap:
1313
configRef:
1414
name: "${CLUSTER_NAME}-md-0"
15-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
15+
apiGroup: bootstrap.cluster.x-k8s.io
1616
kind: KubeadmConfigTemplate
1717
infrastructureRef:
1818
name: "${CLUSTER_NAME}-md-0"
19-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
19+
apiGroup: infrastructure.cluster.x-k8s.io
2020
kind: IBMVPCMachineTemplate
2121
---
2222
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2

templates/cluster-template-powervs-clusterclass.yaml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: cluster.x-k8s.io/v1beta1
1+
apiVersion: cluster.x-k8s.io/v1beta2
22
kind: Cluster
33
metadata:
44
labels:
@@ -15,17 +15,18 @@ spec:
1515
cidrBlocks:
1616
- ${SERVICE_CIDR:="10.128.0.0/12"}
1717
topology:
18-
class: ${IBMPOWERVS_CLUSTER_CLASS_NAME}
18+
classRef:
19+
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME}
1920
controlPlane:
2021
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
2122
version: ${KUBERNETES_VERSION}
2223
workers:
2324
machineDeployments:
2425
- class: default-worker
2526
name: md-0
26-
replicas: 2
27+
replicas: ${WORKER_MACHINE_COUNT}
2728
---
28-
apiVersion: cluster.x-k8s.io/v1beta1
29+
apiVersion: cluster.x-k8s.io/v1beta2
2930
kind: ClusterClass
3031
metadata:
3132
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME:="powervs-cc"}
@@ -37,7 +38,7 @@ spec:
3738
kind: IBMPowerVSMachineTemplate
3839
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME}-control-plane-machinetemplate
3940
ref:
40-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
41+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
4142
kind: KubeadmControlPlaneTemplate
4243
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME}-control-plane
4344
infrastructure:
@@ -51,7 +52,7 @@ spec:
5152
template:
5253
bootstrap:
5354
ref:
54-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
55+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
5556
kind: KubeadmConfigTemplate
5657
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME}-md-0
5758
infrastructure:
@@ -74,7 +75,7 @@ spec:
7475
name: ${IBMPOWERVS_NETWORK_NAME}
7576
serviceInstanceID: ${IBMPOWERVS_SERVICE_INSTANCE_ID}
7677
---
77-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
78+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
7879
kind: KubeadmControlPlaneTemplate
7980
metadata:
8081
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME}-control-plane
@@ -88,12 +89,15 @@ spec:
8889
- ${IBMPOWERVS_VIP}
8990
- ${IBMPOWERVS_VIP_EXTERNAL}
9091
extraArgs:
91-
cloud-provider: external
92+
- name: cloud-provider
93+
value: external
9294
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
9395
controllerManager:
9496
extraArgs:
95-
cloud-provider: external
96-
enable-hostpath-provisioner: "true"
97+
- name: cloud-provider
98+
value: external
99+
- name: enable-hostpath-provisioner
100+
value: "true"
97101
files:
98102
- content: |
99103
apiVersion: v1
@@ -215,21 +219,24 @@ spec:
215219
nodeRegistration:
216220
criSocket: unix:///var/run/containerd/containerd.sock
217221
kubeletExtraArgs:
218-
cloud-provider: external
219-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
222+
- name: cloud-provider
223+
value: external
224+
- name: eviction-hard
225+
value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
220226
name: '{{ v1.local_hostname }}'
221227
joinConfiguration:
222228
discovery:
223229
bootstrapToken:
224230
apiServerEndpoint: 192.168.167.85:${API_SERVER_PORT:=6443}
225231
caCertHashes: []
226-
token: ""
227232
unsafeSkipCAVerification: false
228233
nodeRegistration:
229234
criSocket: unix:///var/run/containerd/containerd.sock
230235
kubeletExtraArgs:
231-
cloud-provider: external
232-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
236+
- name: cloud-provider
237+
value: external
238+
- name: eviction-hard
239+
value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
233240
name: '{{ v1.local_hostname }}'
234241
preKubeadmCommands:
235242
- hostname "{{ v1.local_hostname }}"
@@ -240,7 +247,7 @@ spec:
240247
- for script in $(find /etc/pre-kubeadm-commands/ -name '*.sh' -type f | sort);
241248
do echo "Running script $script"; "$script"; done
242249
---
243-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
250+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
244251
kind: KubeadmConfigTemplate
245252
metadata:
246253
labels:
@@ -255,13 +262,14 @@ spec:
255262
bootstrapToken:
256263
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
257264
caCertHashes: []
258-
token: ""
259265
unsafeSkipCAVerification: false
260266
nodeRegistration:
261267
criSocket: unix:///var/run/containerd/containerd.sock
262268
kubeletExtraArgs:
263-
cloud-provider: external
264-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
269+
- name: cloud-provider
270+
value: external
271+
- name: eviction-hard
272+
value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
265273
name: '{{ v1.local_hostname }}'
266274
preKubeadmCommands:
267275
- hostname "{{ v1.local_hostname }}"

templates/cluster-template-powervs-clusterclass/cluster-with-kcp.yaml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: cluster.x-k8s.io/v1beta1
1+
apiVersion: cluster.x-k8s.io/v1beta2
22
kind: Cluster
33
metadata:
44
labels:
@@ -15,17 +15,18 @@ spec:
1515
cidrBlocks:
1616
- ${SERVICE_CIDR:="10.128.0.0/12"}
1717
topology:
18-
class: "${IBMPOWERVS_CLUSTER_CLASS_NAME}"
18+
classRef:
19+
name: "${IBMPOWERVS_CLUSTER_CLASS_NAME}"
1920
controlPlane:
2021
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
2122
version: ${KUBERNETES_VERSION}
2223
workers:
2324
machineDeployments:
2425
- class: default-worker
2526
name: md-0
26-
replicas: 2
27+
replicas: ${WORKER_MACHINE_COUNT}
2728
---
28-
apiVersion: cluster.x-k8s.io/v1beta1
29+
apiVersion: cluster.x-k8s.io/v1beta2
2930
kind: ClusterClass
3031
metadata:
3132
name: ${IBMPOWERVS_CLUSTER_CLASS_NAME:="powervs-cc"}
@@ -37,7 +38,7 @@ spec:
3738
kind: IBMPowerVSMachineTemplate
3839
name: "${IBMPOWERVS_CLUSTER_CLASS_NAME}-control-plane-machinetemplate"
3940
ref:
40-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
41+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
4142
kind: KubeadmControlPlaneTemplate
4243
name: "${IBMPOWERVS_CLUSTER_CLASS_NAME}-control-plane"
4344
infrastructure:
@@ -51,7 +52,7 @@ spec:
5152
template:
5253
bootstrap:
5354
ref:
54-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
55+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
5556
kind: KubeadmConfigTemplate
5657
name: "${IBMPOWERVS_CLUSTER_CLASS_NAME}-md-0"
5758
infrastructure:
@@ -74,7 +75,7 @@ spec:
7475
name: "${IBMPOWERVS_NETWORK_NAME}"
7576
serviceInstanceID: "${IBMPOWERVS_SERVICE_INSTANCE_ID}"
7677
---
77-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
78+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
7879
kind: KubeadmControlPlaneTemplate
7980
metadata:
8081
name: "${IBMPOWERVS_CLUSTER_CLASS_NAME}-control-plane"
@@ -88,12 +89,15 @@ spec:
8889
- "${IBMPOWERVS_VIP}"
8990
- "${IBMPOWERVS_VIP_EXTERNAL}"
9091
extraArgs:
91-
cloud-provider: external
92+
- name: cloud-provider
93+
value: external
9294
controlPlaneEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
9395
controllerManager:
9496
extraArgs:
95-
cloud-provider: external
96-
enable-hostpath-provisioner: "true"
97+
- name: cloud-provider
98+
value: external
99+
- name: enable-hostpath-provisioner
100+
value: "true"
97101
files:
98102
- content: |
99103
apiVersion: v1
@@ -215,21 +219,24 @@ spec:
215219
nodeRegistration:
216220
criSocket: unix:///var/run/containerd/containerd.sock
217221
kubeletExtraArgs:
218-
cloud-provider: external
219-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
222+
- name: cloud-provider
223+
value: external
224+
- name: eviction-hard
225+
value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
220226
name: '{{ v1.local_hostname }}'
221227
joinConfiguration:
222228
discovery:
223229
bootstrapToken:
224230
apiServerEndpoint: 192.168.167.85:${API_SERVER_PORT:=6443}
225231
caCertHashes: []
226-
token: ""
227232
unsafeSkipCAVerification: false
228233
nodeRegistration:
229234
criSocket: unix:///var/run/containerd/containerd.sock
230235
kubeletExtraArgs:
231-
cloud-provider: external
232-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
236+
- name: cloud-provider
237+
value: external
238+
- name: eviction-hard
239+
value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
233240
name: '{{ v1.local_hostname }}'
234241
preKubeadmCommands:
235242
- hostname "{{ v1.local_hostname }}"

templates/cluster-template-powervs-clusterclass/md.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
1+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
22
kind: KubeadmConfigTemplate
33
metadata:
44
labels:
@@ -13,13 +13,14 @@ spec:
1313
bootstrapToken:
1414
apiServerEndpoint: ${IBMPOWERVS_VIP}:${API_SERVER_PORT:=6443}
1515
caCertHashes: []
16-
token: ""
1716
unsafeSkipCAVerification: false
1817
nodeRegistration:
1918
criSocket: unix:///var/run/containerd/containerd.sock
2019
kubeletExtraArgs:
21-
cloud-provider: external
22-
eviction-hard: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
20+
- name: cloud-provider
21+
value: external
22+
- name: eviction-hard
23+
value: nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%
2324
name: '{{ v1.local_hostname }}'
2425
preKubeadmCommands:
2526
- hostname "{{ v1.local_hostname }}"

0 commit comments

Comments
 (0)