Commit f796b54
committed
Add boot-from-volume support to server controller
Add support for booting servers from Cinder volumes instead of images.
This enables the boot-from-volume (BFV) pattern where a bootable volume
(created from an image) is used as the root disk.
Design decisions:
1. Boot volume vs data volumes separation:
- Only the boot volume (bootVolume field) is attached at server creation
time via Nova's block device mapping
- Additional data volumes continue to use the existing dynamic attachment
mechanism (spec.resource.volumes) which attaches volumes after server
creation
- This separation allows data volumes to remain mutable (add/remove after
server creation) while the boot volume is immutable
- Avoids duplicating volume attachment logic between creation-time and
runtime mechanisms
2. No deleteOnTermination option:
- Deliberately not exposing Nova's delete_on_termination flag
- If enabled, Nova would delete the underlying OpenStack volume when the
server is deleted, but the ORC Volume resource would remain as an orphan
- The orphaned Volume resource would then attempt to recreate the volume,
leading to unexpected behavior
- Users who want the volume deleted should delete both Server and Volume
resources, maintaining consistent ORC resource lifecycle management
API Changes:
- Add ServerBootVolumeSpec type with volumeRef and optional tag fields
- Add bootVolume field to ServerResourceSpec (mutually exclusive with imageRef)
- Make imageRef optional (pointer) with CEL validation
Controller Changes:
- Add bootVolumeDependency with deletion guard and unique controller name
- Handle boot-from-volume in CreateResource by building BlockDevice list
Tests & Examples:
- Add kuttl test for server boot-from-volume scenario
- Add config/samples/openstack_v1alpha1_server_boot_from_volume.yaml
- Add examples/bases/boot-from-volume/ with volume and server examples
assisted-by: claude1 parent f1dc06e commit f796b54
File tree
19 files changed
+525
-27
lines changed- api/v1alpha1
- cmd/models-schema
- config
- crd/bases
- samples
- examples/bases/boot-from-volume
- internal/controllers/server
- tests/server-boot-from-volume
- pkg/clients/applyconfiguration
- api/v1alpha1
- internal
- website/docs
19 files changed
+525
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
| |||
122 | 136 | | |
123 | 137 | | |
124 | 138 | | |
| 139 | + | |
| 140 | + | |
125 | 141 | | |
126 | 142 | | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
132 | | - | |
133 | | - | |
| 148 | + | |
| 149 | + | |
134 | 150 | | |
135 | | - | |
| 151 | + | |
136 | 152 | | |
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
140 | 156 | | |
141 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
142 | 165 | | |
143 | 166 | | |
144 | 167 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
205 | 228 | | |
206 | 229 | | |
207 | 230 | | |
| |||
223 | 246 | | |
224 | 247 | | |
225 | 248 | | |
226 | | - | |
| 249 | + | |
227 | 250 | | |
228 | 251 | | |
229 | 252 | | |
| |||
354 | 377 | | |
355 | 378 | | |
356 | 379 | | |
357 | | - | |
358 | 380 | | |
359 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
360 | 387 | | |
361 | 388 | | |
362 | 389 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
165 | 169 | | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
171 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
172 | 202 | | |
173 | 203 | | |
174 | 204 | | |
| |||
256 | 286 | | |
257 | 287 | | |
258 | 288 | | |
259 | | - | |
| 289 | + | |
260 | 290 | | |
261 | 291 | | |
262 | 292 | | |
263 | 293 | | |
264 | 294 | | |
265 | 295 | | |
266 | 296 | | |
| 297 | + | |
267 | 298 | | |
268 | 299 | | |
269 | 300 | | |
| |||
0 commit comments