@@ -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,14 @@ spec:
211256 nodeRegistration:
212257 name: $${COREOS_OPENSTACK_HOSTNAME}
213258 kubeletExtraArgs:
214- provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
259+ - name: provider-id
260+ value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
215261 joinConfiguration:
216262 nodeRegistration:
217263 name: $${COREOS_OPENSTACK_HOSTNAME}
218264 kubeletExtraArgs:
219- provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
265+ - name: provider-id
266+ value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
220267 format: ignition
221268 ignition:
222269 containerLinuxConfig:
@@ -277,7 +324,7 @@ spec:
277324 [Service]
278325 EnvironmentFile=/run/metadata/flatcar
279326 - selector :
280- apiVersion : bootstrap.cluster.x-k8s.io/v1beta1
327+ apiVersion : bootstrap.cluster.x-k8s.io/v1beta2
281328 kind : KubeadmConfigTemplate
282329 matchResources :
283330 machineDeploymentClass :
@@ -297,7 +344,8 @@ spec:
297344 nodeRegistration:
298345 name: $${COREOS_OPENSTACK_HOSTNAME}
299346 kubeletExtraArgs:
300- provider-id: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
347+ - name: provider-id
348+ value: openstack:///$${COREOS_OPENSTACK_INSTANCE_UUID}
301349 format: ignition
302350 ignition:
303351 containerLinuxConfig:
@@ -365,7 +413,6 @@ metadata:
365413spec :
366414 template :
367415 spec :
368- files : []
369416 joinConfiguration :
370417 nodeRegistration :
371418 kubeletExtraArgs :
@@ -382,6 +429,11 @@ metadata:
382429spec :
383430 template :
384431 spec :
432+ rollout :
433+ strategy :
434+ type : RollingUpdate
435+ rollingUpdate :
436+ maxSurge : 1
385437 kubeadmConfigSpec :
386438 clusterConfiguration :
387439 controllerManager :
@@ -454,8 +506,8 @@ spec:
454506 spec :
455507 flavor : ${OPENSTACK_CONTROL_PLANE_MACHINE_FLAVOR:=m1.medium}
456508 image :
457- filter :
458- name : overridden-by-patch
509+ imageRef :
510+ name : node-image
459511 sshKeyName : ${OPENSTACK_SSH_KEY_NAME:=""}
460512---
461513apiVersion : infrastructure.cluster.x-k8s.io/v1beta1
@@ -467,6 +519,6 @@ spec:
467519 spec :
468520 flavor : ${OPENSTACK_NODE_MACHINE_FLAVOR:=m1.small}
469521 image :
470- filter :
471- name : overridden-by-patch
522+ imageRef :
523+ name : node-image
472524 sshKeyName : ${OPENSTACK_SSH_KEY_NAME:=""}
0 commit comments