✨ Simplify VM create network interface provisioning#1573
Open
bryanv wants to merge 1 commit into
Open
Conversation
dabb8f0 to
eae2a8c
Compare
a84ddff to
5213024
Compare
hpannem
approved these changes
May 8, 2026
| mgr.GetScheme(), | ||
| mgr.GetRESTMapper(), | ||
| &vmopv1.VirtualMachine{}, | ||
| handler.OnlyControllerOwner()), |
Contributor
There was a problem hiding this comment.
is this because of old vms which didnt have controller owner?
Contributor
Author
There was a problem hiding this comment.
Kind of. The network interface CRs that we create should have always been controller refs but weren't. I fixed that recently and all VPC SubnetPorts will be controller owner refs, but I changed this for consistency with the others and just for BYO network interface support (although the precise life cycle of those are still TBD)
Collaborator
There was a problem hiding this comment.
Shouldn't we be patching existing objects with ControllerRefs then?
90ff118 to
9642b98
Compare
akutz
reviewed
May 11, 2026
Collaborator
akutz
left a comment
There was a problem hiding this comment.
Requested some feedback, but not necessarily changes. Let me know what you think.
e6763aa to
dd1d0d3
Compare
Replace blocking network interface polling with watch-based reconciliation and introduce NetworkDevice type for create flow optimizations. This is the first in several in addressing the cruft that has built up around the network interfaces. Issues in the Update path will be next. - Add CreateNetworkDevices function for VM create that creates all network interface CRs and checks readiness without polling, returning NetworkDevices containing just what is needed for the ethernet card device - Add VM controller watches for NetworkInterface, VirtualNetworkInterface, and SubnetPort so the polling can be removed. - Keep existing CreateAndWaitForNetworkInterfaces for update path that needs full NetworkInterfaceResult with bootstrap customization fields The interface CR create code is shared between the two functions. The create flow now creates all interface CRs, immediately checks readiness, and returns either devices or an error. Controller watches ensure prompt re-reconciliation when CRs become ready, eliminating the 15-second polling timeout that blocked VM creation. This will speed up creation of VMs with network interfaces. Parts of this change facilitate later work such as mixed network provider setups, and BYO network interface.
dd1d0d3 to
f6fbc86
Compare
Minimum allowed line rate is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do, and why is it needed?
Replace blocking network interface polling with watch-based reconciliation and introduce NetworkDevice type for create flow optimizations.
This is the first in several in addressing the cruft that has built up around the network interfaces. Issues in the Update path will be next.
The create flow now creates all interface CRs, immediately checks readiness, and returns either devices or an error. Controller watches ensure prompt re-reconciliation when CRs become ready, eliminating the 15-second polling timeout that blocked VM creation. This will speed up creation of VMs with network interfaces.
Parts of this change facilitate later work such as mixed network provider setups, and BYO network interface.
Which issue(s) is/are addressed by this PR? (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Are there any special notes for your reviewer:
Please add a release note if necessary: