Commit 8017c89
committed
Store []ResolvedPortSpec in ReferencedMachineResources
The purpose of this change is fix an issue where we are storing
unresolved references in ReferencedMachineResources. Specifically we are
storing a PortOpts, which is a user-intent struct. PortOpts can contain
unresolved references to both subnets and security groups, as well
fields requiring additional processing which reference external objects:
the port name, description, and tags.
We create a new type, ResolvedPortSpec, which can contain only fully
resolved data. This can be seen in the new signature of CreatePorts(),
which no longer requires any source of data other than the
[]ResolvedPortSpec from ReferencedMachineResources, and is now greatly
simplified.
Fully resolving the port name also allows a simplification in port
adoption.
All of the complexity now moves to ConstructPorts(), which is updated to
return []ResolvedPortSpec instead of []PortOpts. ConstructPorts() is
updated to resolve security groups, port name, description, and all
subnets referenced in FixedIPs.1 parent 2b03429 commit 8017c89
File tree
29 files changed
+1839
-2174
lines changed- api
- v1alpha5
- v1alpha6
- v1alpha7
- v1beta1
- config/crd/bases
- controllers
- docs/book/src/api/v1beta1
- pkg
- cloud/services
- compute
- networking
- utils/names
- test/e2e/suites/e2e
29 files changed
+1839
-2174
lines changedSome 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 | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
574 | 576 | | |
575 | 577 | | |
576 | 578 | | |
| |||
582 | 584 | | |
583 | 585 | | |
584 | 586 | | |
585 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
| |||
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 | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
220 | 254 | | |
221 | 255 | | |
222 | 256 | | |
| |||
241 | 275 | | |
242 | 276 | | |
243 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
244 | 311 | | |
245 | 312 | | |
246 | 313 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments