@@ -5,7 +5,7 @@ metadata:
55spec :
66 controlPlane :
77 templateRef :
8- apiVersion : controlplane.cluster.x-k8s.io/v1beta1
8+ apiVersion : controlplane.cluster.x-k8s.io/v1beta2
99 kind : KubeadmControlPlaneTemplate
1010 name : dev-test-control-plane
1111 machineInfrastructure :
2323 - class : default-worker
2424 bootstrap :
2525 templateRef :
26- apiVersion : bootstrap.cluster.x-k8s.io/v1beta1
26+ apiVersion : bootstrap.cluster.x-k8s.io/v1beta2
2727 kind : KubeadmConfigTemplate
2828 name : dev-test-default-worker-bootstraptemplate
2929 infrastructure :
@@ -53,16 +53,22 @@ spec:
5353 type : string
5454 description : |
5555 The base name of the OpenStack image that is used for creating the servers.
56- This will be combined with the k8s version to create the full name. E.g. imageName-v1.31.2.
57- default : " ubuntu-2404-kube"
5856 - name : addImageVersion
5957 required : false
6058 schema :
6159 openAPIV3Schema :
6260 type : boolean
6361 description : |
64- Add a suffix with the Kubernetes version to the imageName. E.g. imageName-v1.32.2.
62+ Add a suffix with the Kubernetes version to the imageName or imageRef . E.g. imageName-v1.32.2.
6563 default : true
64+ - name : imageRef
65+ required : false
66+ schema :
67+ openAPIV3Schema :
68+ type : string
69+ description : |
70+ The name of the ORC Image object that is used for creating the servers.
71+ default : " node-image"
6672 - name : injectIgnitionSysext
6773 required : false
6874 schema :
@@ -109,6 +115,12 @@ spec:
109115 name :
110116 type : string
111117 description : " Name of the image to use for bastion"
118+ imageRef :
119+ type : object
120+ properties :
121+ name :
122+ type : string
123+ description : " Name of the ORC Image to use for bastion"
112124 sshKeyName :
113125 type : string
114126 description : " SSH key pair name for bastion access"
@@ -120,20 +132,23 @@ spec:
120132 type : string
121133 description : " Availability zone for the bastion host"
122134 patches :
123- - name : image
124- description : " Sets the OpenStack image that is used for creating the servers."
135+ - name : imageName
136+ description : " Sets the OpenStack image that is used for creating the servers using a name filter."
137+ enabledIf : " {{ if .imageName }}true{{ end }}"
125138 definitions :
126139 - selector :
127140 apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
128141 kind : OpenStackMachineTemplate
129142 matchResources :
130143 controlPlane : true
131144 jsonPatches :
145+ - op : remove
146+ path : /spec/template/spec/image/imageRef
132147 - op : add
133- path : /spec/template/spec/image/filter/name
148+ path : /spec/template/spec/image/filter
134149 valueFrom :
135150 template : |
136- {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }}
151+ name: {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }}
137152 - selector :
138153 apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
139154 kind : OpenStackMachineTemplate
@@ -142,11 +157,41 @@ spec:
142157 names :
143158 - default-worker
144159 jsonPatches :
160+ - op : remove
161+ path : /spec/template/spec/image/imageRef
145162 - op : add
146- path : /spec/template/spec/image/filter/name
163+ path : /spec/template/spec/image/filter
147164 valueFrom :
148165 template : |
149- {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.machineDeployment.version }}{{ end }}
166+ name: {{ .imageName }}{{ if .addImageVersion }}-{{ .builtin.machineDeployment.version }}{{ end }}
167+ - name : imageRef
168+ description : " Sets the OpenStack image that is used for creating the servers using an ORC Image reference."
169+ enabledIf : " {{ if .imageRef }}true{{ end }}"
170+ definitions :
171+ - selector :
172+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
173+ kind : OpenStackMachineTemplate
174+ matchResources :
175+ controlPlane : true
176+ jsonPatches :
177+ - op : replace
178+ path : /spec/template/spec/image/imageRef/name
179+ valueFrom :
180+ template : |
181+ {{ .imageRef }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }}
182+ - selector :
183+ apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
184+ kind : OpenStackMachineTemplate
185+ matchResources :
186+ machineDeploymentClass :
187+ names :
188+ - default-worker
189+ jsonPatches :
190+ - op : replace
191+ path : /spec/template/spec/image/imageRef/name
192+ valueFrom :
193+ template : |
194+ {{ .imageRef }}{{ if .addImageVersion }}-{{ .builtin.controlPlane.version }}{{ end }}
150195 - name : identityRef
151196 description : " Sets the OpenStack identity reference."
152197 definitions :
@@ -193,7 +238,7 @@ spec:
193238 enabledIf : " {{ .injectIgnitionSysext }}"
194239 definitions :
195240 - selector :
196- apiVersion : controlplane.cluster.x-k8s.io/v1beta1
241+ apiVersion : controlplane.cluster.x-k8s.io/v1beta2
197242 kind : KubeadmControlPlaneTemplate
198243 matchResources :
199244 controlPlane : true
@@ -211,12 +256,18 @@ spec:
211256 nodeRegistration:
212257 name: $${COREOS_OPENSTACK_HOSTNAME}
213258 kubeletExtraArgs:
214- provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
259+ - name: cloud-provider
260+ value: external
261+ - name: provider-id
262+ value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
215263 joinConfiguration:
216264 nodeRegistration:
217265 name: $${COREOS_OPENSTACK_HOSTNAME}
218266 kubeletExtraArgs:
219- provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
267+ - name: cloud-provider
268+ value: external
269+ - name: provider-id
270+ value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
220271 format: ignition
221272 ignition:
222273 containerLinuxConfig:
@@ -233,16 +284,16 @@ spec:
233284 mode: 0644
234285 contents:
235286 remote:
236- url: https://github.com/ flatcar/sysext-bakery/releases/download/latest /kubernetes-{{ $minor }}.conf
287+ url: https://extensions. flatcar.org/extensions/kubernetes /kubernetes-{{ $minor }}.conf
237288 - path: /etc/sysupdate.d/noop.conf
238289 mode: 0644
239290 contents:
240291 remote:
241- url: https://github.com/ flatcar/sysext-bakery/releases/download/latest /noop.conf
292+ url: https://extensions. flatcar.org/extensions /noop.conf
242293 - path: /opt/extensions/kubernetes/kubernetes-{{ .builtin.controlPlane.version }}-x86-64.raw
243294 contents:
244295 remote:
245- url: https://github.com/ flatcar/sysext-bakery/releases/download/latest /kubernetes-{{ .builtin.controlPlane.version }}-x86-64.raw
296+ url: https://extensions. flatcar.org/extensions /kubernetes-{{ .builtin.controlPlane.version }}-x86-64.raw
246297 systemd:
247298 units:
248299 - name: systemd-sysupdate.service
@@ -277,7 +328,7 @@ spec:
277328 [Service]
278329 EnvironmentFile=/run/metadata/flatcar
279330 - selector :
280- apiVersion : bootstrap.cluster.x-k8s.io/v1beta1
331+ apiVersion : bootstrap.cluster.x-k8s.io/v1beta2
281332 kind : KubeadmConfigTemplate
282333 matchResources :
283334 machineDeploymentClass :
@@ -297,7 +348,10 @@ spec:
297348 nodeRegistration:
298349 name: $${COREOS_OPENSTACK_HOSTNAME}
299350 kubeletExtraArgs:
300- provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
351+ - name: cloud-provider
352+ value: external
353+ - name: provider-id
354+ value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
301355 format: ignition
302356 ignition:
303357 containerLinuxConfig:
@@ -314,16 +368,16 @@ spec:
314368 mode: 0644
315369 contents:
316370 remote:
317- url: https://github.com/ flatcar/sysext-bakery/releases/download/latest /kubernetes-{{ $minor }}.conf
371+ url: https://extensions. flatcar.org/extensions/kubernetes /kubernetes-{{ $minor }}.conf
318372 - path: /etc/sysupdate.d/noop.conf
319373 mode: 0644
320374 contents:
321375 remote:
322- url: https://github.com/ flatcar/sysext-bakery/releases/download/latest /noop.conf
376+ url: https://extensions. flatcar.org/extensions /noop.conf
323377 - path: /opt/extensions/kubernetes/kubernetes-{{ .builtin.machineDeployment.version }}-x86-64.raw
324378 contents:
325379 remote:
326- url: https://github.com/ flatcar/sysext-bakery/releases/download/latest /kubernetes-{{ .builtin.machineDeployment.version }}-x86-64.raw
380+ url: https://extensions. flatcar.org/extensions /kubernetes-{{ .builtin.machineDeployment.version }}-x86-64.raw
327381 systemd:
328382 units:
329383 - name: systemd-sysupdate.service
@@ -365,7 +419,6 @@ metadata:
365419spec :
366420 template :
367421 spec :
368- files : []
369422 joinConfiguration :
370423 nodeRegistration :
371424 kubeletExtraArgs :
@@ -382,6 +435,11 @@ metadata:
382435spec :
383436 template :
384437 spec :
438+ rollout :
439+ strategy :
440+ type : RollingUpdate
441+ rollingUpdate :
442+ maxSurge : 1
385443 kubeadmConfigSpec :
386444 clusterConfiguration :
387445 controllerManager :
@@ -454,8 +512,8 @@ spec:
454512 spec :
455513 flavor : ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR:=m1.medium}
456514 image :
457- filter :
458- name : overridden-by-patch
515+ imageRef :
516+ name : node-image
459517 sshKeyName : ${OPENSTACK_SSH_KEY_NAME:=""}
460518---
461519apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
@@ -467,6 +525,6 @@ spec:
467525 spec :
468526 flavor : ${OPENSTACK_NODE_MACHINE_FLAVOR:=m1.small}
469527 image :
470- filter :
471- name : overridden-by-patch
528+ imageRef :
529+ name : node-image
472530 sshKeyName : ${OPENSTACK_SSH_KEY_NAME:=""}
0 commit comments