[network-driver] Add support for multi-pool Resource IPAM#44124
Merged
pippolo84 merged 4 commits intocilium:feature/dra-driverfrom Feb 26, 2026
Merged
Conversation
cd1eb8e to
bd21c60
Compare
9bc91a5 to
0a1a482
Compare
7ac8ba1 to
a404e1f
Compare
9b6edda to
f6b597f
Compare
f6b597f to
371add5
Compare
69cee71 to
ffb12cc
Compare
c4333ad to
fc2ddb6
Compare
fc2ddb6 to
b743b4e
Compare
Member
Author
|
/test |
gandro
reviewed
Feb 17, 2026
antonipp
reviewed
Feb 18, 2026
Contributor
antonipp
left a comment
There was a problem hiding this comment.
Still catching up on the full context of the feature you are working on but generally LGTM, just have 1 question
b743b4e to
d6c7fb1
Compare
Member
Author
|
/test |
gandro
approved these changes
Feb 23, 2026
This avoid the linear search for each device configuration and allows to ask all the needed IP addresses in one go, so that multi-pool resource IPAM can immediately start to allocate the needed CIDRs from the operator. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
In order to instantiate a new manager for DRA resource IPAM in the Cilium Network Driver, let's export the multiPoolManager and its methods useful for the driver. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Allocate IP addresses to claimed resources from pools defined in CiliumResourceIPPool k8s objects. The Cilium Network Driver embeds a multi-pool manager that handles the requests and interact with the operator to get the needed CIDRs from the referenced pool. Then, the single IPs are allocated based on the ResourceClaim specification in the PrepareResourceClaim DRA hook. In case the ResourceClaim specifies statis IP addresses instead of referencing a pool, those have precedence over multi-pool allocation. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
Add integration style unit tests for network driver IPAM. The tests verifies the management of both static IP addresses and dynamic allocation with multi pool Resource IPAM. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
d6c7fb1 to
65644bf
Compare
Member
Author
|
/test |
Member
Author
|
sig-ipam covered by Sebastian and already addressed the feedback from Anton. Merging now. |
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.
Multi-Pool Resource IPAM replicates the way Multi-Pool IPAM mode allocates IP addresses to pods, but specializes for DRA resources. When a pod with a ResourceClaim is scheduled on a node, the Cilium Network Driver is responsible for setting up the needed DRA resources to fulfill the claim. With Multi Pool Resource IPAM the claim may specify a pool (namely, a
CiliumResourceIPPoolobject) from which the IP address should be taken and assigned to the resource.This PR adds the agent part of Multi-Pool Resource IPAM (for more details refer to the Cilium Network Driver CfP). The needed IP addresses are taken from the pool specified in the ResourceClaim device request and assigned to the DRA resource in the
PrepareResourceClaimshook.How to test the PR manually
Enable the Cilium Network Driver in the Helm chart:
Create a two nodes kind cluster and install Cilium:
Enable Cilium Network Driver for dummy devices on each node,
kind-workerandkind-control-plane:Add two dummy devices on
kind-worker:Define the DeviceClass for dummy devices:
Add two CiliumResourceIPPool,
a-ip-poolandb-ip-pool:Create a ResourceClaimTemplate that requests two dummy devices, one with addresses from
a-ip-pooland the other with addresses fromb-ip-pool:Add a pod using the ResourceClaim
dummyto request two dummy devices:The pod is scheduled on
kind-workernode, withdummy0anddummy1devices having addresses from thea-ip-poolandb-ip-poolrespectively:The
kind-workerCiliumNode reports the CIDRs requested from and allocated to the node:$ ks get ciliumnode kind-worker -o yaml | yq .spec.ipam.resourcepools allocated: - cidrs: - 10.10.0.0/24 - fd00:100:1::/64 pool: a-ip-pool - cidrs: - 10.20.0.0/24 - fd00:200:1::/64 pool: b-ip-pool requested: - needed: ipv4-addrs: 1 ipv6-addrs: 1 pool: a-ip-pool - needed: ipv4-addrs: 1 ipv6-addrs: 1 pool: b-ip-poolRelated: #44081
Depends on #44081