✨ Dual-stack networking: NetOP IPv6 assignment modes, VirtualMachineService changes#1552
Open
hpannem wants to merge 7 commits intovmware-tanzu:mainfrom
Open
✨ Dual-stack networking: NetOP IPv6 assignment modes, VirtualMachineService changes#1552hpannem wants to merge 7 commits intovmware-tanzu:mainfrom
hpannem wants to merge 7 commits intovmware-tanzu:mainfrom
Conversation
silvery1622
reviewed
Apr 9, 2026
e7e75c6 to
b381130
Compare
Collaborator
|
I would like this to also handle changes to the ports. We can discuss offline, and I'll update here after we do. |
bryanv
reviewed
Apr 13, 2026
b381130 to
6f00f42
Compare
Contributor
Author
Got your point. I will track this as separate ticket. |
silvery1622
added a commit
to silvery1622/cluster-api-provider-vsphere
that referenced
this pull request
Apr 20, 2026
Pin github.com/vmware-tanzu/vm-operator/api and external/ncp to v0.0.0-20260415041850-86db0a258f37 in both go.mod and test/go.mod. This corresponds to the tip of hpannem's topic/hpannem/dualstack-final branch (vmware-tanzu/vm-operator PR kubernetes-sigs#1552). The PR adds: - VirtualMachineService dual-stack Service fields (ipFamilies, ipFamilyPolicy) and endpoint controller behavior. - NetOP IPv6 assignment mode derivation from status.ipv6AssignmentMode. - Conversion annotations so hub-only dual-stack fields round-trip in older API versions. replace directives are added to redirect the vmware-tanzu sub-modules to hpannem's fork until the PR is merged and released upstream. TODO: remove the replace directives once PR kubernetes-sigs#1552 merges. Ref: vmware-tanzu/vm-operator#1552
bryanv
reviewed
Apr 20, 2026
| } | ||
|
|
||
| // For SingleStack policy without explicit IPFamilies, use ClusterIP family as primary | ||
| if service.Spec.IPFamilyPolicy != nil && *service.Spec.IPFamilyPolicy == corev1.IPFamilyPolicySingleStack { |
Contributor
There was a problem hiding this comment.
Isn't the Service Spec.IPFamilies written back to as to what was selected?
Contributor
Author
There was a problem hiding this comment.
Good point. I introduced this as a fallback in case if service.IPfamilies are not filled for some reason in the Service. We could default it to spec.Service.IPFamilies always. what do you suggest? Except legacy clusters, I believe the field would be filled by K8s.
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?
net-operator-apiand derives IPv4 vs IPv6 assignment fromstatus.ipAssignmentModeandstatus.ipv6AssignmentMode(unset IPv6 mode treated as none). StaticIPConfigsare emitted only for families in static-pool mode. Updates tests and the bundled NetOP CRD reference as needed.Servicefields (ipFamilies,ipFamilyPolicy) and controller behavior for endpoints; extends unit/integration coverage.VirtualMachineServiceuses conversion annotations so hub-only dual-stack fields round-trip.VirtualMachinerestoresspec.network.interfaces[].ipFamilyPolicyon spoke→hub (by interface name) together with existing VLAN/bootstrap/etc. restores.zz_generated.conversion.gosoVirtualMachineNetworkSpec.Interfacesconverts via per-elementConvert_*(no unsafe slice reinterpretation for that slice).Which issue(s) is/are addressed by this PR? (optional)
Fixes #
Are there any special notes for your reviewer?
IPFamilyPolicyexists only on the v1alpha6 interface type; spokes do not have the field—values are preserved via annotation + restore onVirtualMachine.ConvertTo, not via typed spoke fields.api/test/v1alpha5/virtualmachine_conversion_test.goincludesspec.network.interfaces.ipFamilyPolicyhub↔spoke↔hub; fuzz conversion tests still run per spoke.Please add a release note if necessary: