• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rollandf / nvidia-k8s-ipam / 20091146080

10 Dec 2025 07:44AM UTC coverage: 54.058% (-0.07%) from 54.131%
20091146080

push

github

rollandf
feat: implement perNodeExclusions logic for IPPool and CIDRPool

Add logic to convert index-based perNodeExclusions to IP-based exclusions
in the ipam-node controllers. Each node converts its allocated IP range
exclusions independently and merges them with pool-wide exclusions.

Changes:
- Add buildPerNodeExclusions() to IPPool controller
  - Converts index-based exclusions to IP addresses for node's IP block
  - Merges with pool-wide exclusions before passing to allocator
- Add buildPerNodeExclusions() to CIDRPool controller
  - Converts index-based exclusions to IP addresses for node's prefix
  - Combines with filtered pool-wide exclusions
- Add unit tests

Implementation details:
- Each node processes only its own allocation (per-node)
- Index-based ranges are converted to IP-based ExclusionRange objects
- Ranges are clamped to node's allocation boundaries
- Ranges outside node's allocation are skipped
- Reuses existing allocator exclusion mechanism (no allocator changes)

Example:
  perNodeExclusions:
    - startIndex: 0
      endIndex: 10

Node-A (192.168.0.1-192.168.0.100) excludes 192.168.0.1-192.168.0.11
Node-B (192.168.0.101-192.168.0.200) excludes 192.168.0.101-192.168.0.111

Signed-off-by: Fred Rolland <frolland@nvidia.com>

52 of 62 new or added lines in 2 files covered. (83.87%)

19 existing lines in 4 files now uncovered.

2218 of 4103 relevant lines covered (54.06%)

9.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.18
/pkg/ipam-node/controllers/ippool/ippool.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc