Skip to content

[v1.19 backport] Azure IP Release & Vnet enumeration - #663

Closed
jaredledvina wants to merge 14 commits into
v1.19-ddfrom
jared.ledvina/azure-release-excess-ips-v1.19-listall-fix
Closed

[v1.19 backport] Azure IP Release & Vnet enumeration #663
jaredledvina wants to merge 14 commits into
v1.19-ddfrom
jared.ledvina/azure-release-excess-ips-v1.19-listall-fix

Conversation

@jaredledvina

Copy link
Copy Markdown
Member

No description provided.

yuecong and others added 13 commits April 30, 2026 16:55
This PR implements a targeted subnet discovery optimization for Azure IPAM that eliminates Azure NRP throttling by replacing subscription-wide VNet enumeration with targeted subnet queries.

Key Changes:

- Three-phase subnet discovery strategy:
  1. Query all node instances (existing method)
  2. Extract unique subnet IDs from node network interfaces
  3. Query only the specific subnets that nodes actually use

- Performance improvements:
  - Reduces API calls from O(n*m) to O(k) where k = unique subnets used by nodes
  - Eliminates subscription-wide VNet enumeration that causes throttling
  - Maintains backward compatibility with fallback to full VNet discovery

Test Results:

- All API tests pass including new parseSubnetID validation tests
- Azure IPAM functionality preserved with enhanced logging
- Existing IPAM allocation tests demonstrate continued functionality

Breaking Changes:

None - maintains full backward compatibility with existing IPAM behavior.

Performance Impact:

Significantly improved performance in large Azure environments with many VNets while maintaining the same IPAM functionality. The optimization shows "targeted_subnets" count in logs for visibility.

Test plan:

- Unit tests for parseSubnetID function with 8 validation scenarios
- Azure API tests pass
- Mock implementation updated for GetNodesSubnets
- IPAM allocation tests demonstrate preserved functionality

I deployed this change to the main branch to our internal clusters and confirmed that this works. Also for the 1.16 version, we have used it in production for more than 2 months in ~100 clusters

Signed-off-by: yuecong <cong@databricks.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
…ease

Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Adding the name and primary fields to AzureAddress changed the
CiliumNode CRD schema, but the CRD schema version was not bumped.
The operator only re-applies the embedded CRD when its version is
newer than the version label on the cluster's CRD, so the new
fields were never deployed and were silently pruned by the API
server on every write.

Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
@jaredledvina
jaredledvina force-pushed the jared.ledvina/azure-release-excess-ips-v1.19-listall-fix branch from f570f0f to ba7e568 Compare May 1, 2026 20:06
Signed-off-by: jaredledvina <jared.ledvina@datadoghq.com>
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.

2 participants