feat(vm): add IPAM for additional network interfaces#2612
Merged
Conversation
hardcoretime
requested review from
Isteb4k,
fl64,
goganat,
nevermarine,
prismagod,
universal-itengineer and
yaroslavborbat
as code owners
July 8, 2026 02:28
hardcoretime
force-pushed
the
feat/vm/additional-network-ipam
branch
from
July 9, 2026 01:01
920d0e4 to
d5acfb3
Compare
Contributor
|
Workflow has started. The target step completed with status: failure. |
hardcoretime
force-pushed
the
feat/vm/additional-network-ipam
branch
from
July 9, 2026 08:13
d5acfb3 to
bc615b4
Compare
prismagod
previously approved these changes
Jul 10, 2026
hardcoretime
force-pushed
the
feat/vm/additional-network-ipam
branch
from
July 10, 2026 16:31
c5ed5e8 to
6fa53cb
Compare
hardcoretime
force-pushed
the
feat/vm/additional-network-ipam
branch
from
July 14, 2026 13:27
6fa53cb to
f5c9b8e
Compare
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
Co-authored-by: Max Chervov <max.chervov@gmail.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com>
hardcoretime
requested review from
LopatinDmitr,
maxinsky,
prismagod and
universal-itengineer
July 15, 2026 16:16
universal-itengineer
approved these changes
Jul 15, 2026
maxinsky
approved these changes
Jul 15, 2026
deckhouse-BOaTswain
pushed a commit
that referenced
this pull request
Jul 16, 2026
Add IPAM (IP Address Management) for virtual machine additional network interfaces, integrating with the SDN module's IPAM capabilities (address pools, IPAddress resources, DHCP delivery). Signed-off-by: Roman Sysoev <roman.sysoev@flant.com> Co-authored-by: Max Chervov <max.chervov@gmail.com>
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.
Description
Add IPAM (IP Address Management) for virtual machine additional network interfaces, integrating with the SDN module's IPAM capabilities (address pools,
IPAddressresources, DHCP delivery).Two allocation modes are supported for additional networks that have an IPAM pool (
spec.ipam.ipAddressPoolRef):Automatic (DHCP): when
ipAddressNameis not set in.spec.networks[], the VM controller creates an SDNIPAddress(typeAuto) bound to the VM viaownerReferencesand passes it to SDN. SDN allocates an address from the pool and delivers it to the guest OS via DHCP. The address is stable across VM restarts and migrations (bound to the VM, not the ephemeral pod).Static: when
ipAddressNameis set, the controller uses a user-providedIPAddressresource (typeStatic). The address is determined by the user.If an additional network does not have an IPAM pool, the feature is not enabled — the interface operates in L2-only mode with manual IP configuration in the guest OS (as before).
The allocated IP address is reflected in
status.networks[].ipAddress.Why do we need it, and what problem does it solve?
Previously, additional network interfaces operated at L2 only — IP addresses had to be configured manually inside the guest OS (e.g., via Cloud-Init). This led to:
VirtualMachineIPAddress).Startingwhen network configuration was invalid — CNId8-sdnfails hard on missingIPAddress, blocking pod creation.This PR solves these by having the VM controller manage
IPAddressresources for additional networks (analogous toVirtualMachineIPAddressfor the Main network), with resilient startup (skip problematic interfaces) and reactive reconciliation (watchIPAddressto provision interfaces when addresses become available).What is the expected result?
ipAddressName).status.networks[].ipAddress.ipAddressNamereferences a non-existentIPAddress, or the network has no pool), the VM starts without that interface and reports the error in theNetworkReadycondition.ipAddressName(add/remove/switch auto↔static) is applied live without pod recreation or VM restart.IPAddressafter VM start triggers reconciliation via watcher — the interface is attached automatically (hotplug).Checklist
Changelog entries