Skip to content

Subnet: mixed-mode — static poolRanges with DHCPServer#1421

Open
poojav25 wants to merge 3 commits intovmware-tanzu:mainfrom
poojav25:feature/subnet-mixed-mode-ipam
Open

Subnet: mixed-mode — static poolRanges with DHCPServer#1421
poojav25 wants to merge 3 commits intovmware-tanzu:mainfrom
poojav25:feature/subnet-mixed-mode-ipam

Conversation

@poojav25
Copy link
Copy Markdown

Supports mixed mode on Subnet: subnetDHCPConfig.mode=DHCPServer together with advancedConfig.staticIPAllocation.enabled=true and optional poolRanges (static pool); NSX gets static_ip_allocation.pool_ranges. CEL + webhook validate ranges and DHCPRelay conflicts; builder, compare, and NSX→CR mapping handle the new field. staticIPAllocation.enabled immutability is unchanged. SDK bumped for StaticIpAllocation.PoolRanges. Tests and sample CR updated.

Allow static IP allocation alongside DHCPServer on the same VPC Subnet.
Add structured poolRanges on staticIPAllocation, CEL and webhook validation,
NSX builder/compare/reverse-mapper wiring, util helpers, tests and samples.
Bump NSX Go SDK for StaticIpAllocation.PoolRanges.
@zhengxiexie
Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

Comment thread pkg/nsx/services/subnet/compare_test.go
Comment thread pkg/nsx/services/subnet/subnet.go
Comment thread pkg/nsx/services/subnet/subnet.go Outdated
Comment thread pkg/util/utils.go Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 5, 2026

Codecov Report

❌ Patch coverage is 91.52542% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.07%. Comparing base (beab241) to head (1ffe02e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controllers/subnet/subnet_webhook.go 82.45% 5 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1421      +/-   ##
==========================================
+ Coverage   75.51%   77.07%   +1.56%     
==========================================
  Files         154      154              
  Lines       26420    22105    -4315     
==========================================
- Hits        19951    17038    -2913     
+ Misses       5265     3859    -1406     
- Partials     1204     1208       +4     
Flag Coverage Δ
unit-tests 77.07% <91.52%> (+1.56%) ⬆️
Files with missing lines Coverage Δ
pkg/nsx/client.go 92.47% <100.00%> (+0.19%) ⬆️
pkg/nsx/cluster.go 59.83% <100.00%> (+0.62%) ⬆️
pkg/nsx/services/subnet/builder.go 93.44% <100.00%> (+3.16%) ⬆️
pkg/nsx/services/subnet/compare.go 92.59% <100.00%> (-2.15%) ⬇️
pkg/nsx/services/subnet/subnet.go 79.54% <100.00%> (+0.82%) ⬆️
pkg/util/utils.go 88.85% <100.00%> (+2.62%) ⬆️
pkg/controllers/subnet/subnet_webhook.go 85.00% <82.45%> (-0.83%) ⬇️

... and 141 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants