✨ Implement spec.advanced.extraConfig and NIC-level ExtraConfig reconciliation#1676
Open
hpannem wants to merge 1 commit into
Open
✨ Implement spec.advanced.extraConfig and NIC-level ExtraConfig reconciliation#1676hpannem wants to merge 1 commit into
spec.advanced.extraConfig and NIC-level ExtraConfig reconciliation#1676hpannem wants to merge 1 commit into
Conversation
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?
Adds a reconciliation path for
spec.advanced.extraConfigkey-value pairs and per-NIC ExtraConfig keys against the live vSphere VM configuration.Previously, ExtraConfig entries set on a
VirtualMachinewere only applied at creation time. This PR makes them continuously reconciled: the controller detects drift and drivesConfigSpec.ExtraConfigandConfigSpec.DeviceChangeupdates on powered-on VMs, with correct lifecycle semantics surfaced via conditions.For NIC-scoped ExtraConfig keys (
ethernetX.*), the reconciler additionally validates againstspec.network.interfaces[].advancedPropertiesand promotes known first-class VMXNet3 properties (VNUMANodeID,UPTv2Enabled) to explicit device edits rather than raw ExtraConfig. New spec fields expose these first-class properties directly:spec.network.interfaces[].vnumaNodeID— NUMA affinity for the NICspec.network.interfaces[].vmxnet3.uptv2Enabled— UPTv2 on VMXNet3 NICsstatus.network.interfaces[].vnumaNodeID/.vmxnet3— observed device stateA new
VirtualMachineNetworkConfigSyncedcondition reflects whether NIC-level config is in sync, pending a power-cycle, or requires a power-off.Which issue(s) is/are addressed by this PR? (optional, in
fixes #<issue number>format):Fixes # vmop-3782
Are there any special notes for your reviewer:
pkg/vmconfig/extraconfighandles the genericspec.advanced.extraConfigreconcile;pkg/vmconfig/networkextraconfighandles the NIC-level specialisation.findOrCreateDeviceEditensures at most oneVirtualDeviceConfigSpecOperationEditper device key per reconcile pass, even when multiple fields change simultaneously.*vimtypes.VirtualVmxnet3, excludingVirtualSriovEthernetCard) — not device key range checks.AdvancedPropertiesentries that duplicate a first-class NIC key are logged and skipped (webhook should have blocked them; this is defence-in-depth).Please add a release note if necessary: