-
Notifications
You must be signed in to change notification settings - Fork 259
feature: Adding apipa nic support for swiftv2 windows #4012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This PR updates both CNS and CNI code to construct apipa nic as separate entry in podIpInfo if either of allowhostonc or allownctohost set. This allows CNI to treat this as separate endpoint and align with current cni design/model of 1 nic per endpoint info. CNI then iterates through endpoint info and creates one nic at a time. Signed-off-by: Tamilmani <tamanoha@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the handling of APIPA (Automatic Private IP Addressing) NICs by creating them as separate entries in the podIpInfo structure when either allowhostonc or allownctohost flags are set. This aligns with the CNI design model of having one NIC per endpoint.
- Introduces a new
ApipaNICtype constant for APIPA network interface classification - Adds logic to create separate APIPA NIC entries in CNS when communication flags are enabled
- Updates CNI to handle APIPA NICs with specialized configuration including skipped default routes
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cns/NetworkContainerContract.go | Adds ApipaNIC constant and communication flags to PodIpInfo struct |
| cns/restserver/ipam.go | Implements logic to create separate APIPA NIC entries when communication flags are set |
| cni/network/invoker_cns.go | Adds APIPA NIC handling in CNI with specialized configuration function |
| network/network_windows.go | Updates network creation logic to skip network creation for APIPA NICs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days |
|
Pull request closed due to inactivity. |
|
reopen |
… podipinfo to support apipa endpoint create request. persist networkcontainer id in cns state to support delete apipa endpoint when called as endpoint name based on networkcontainerid. Signed-off-by: Tamilmani <tamanoha@microsoft.com>
Signed-off-by: Tamilmani <tamanoha@microsoft.com>
…S in stateless cni case Signed-off-by: Tamilmani <tamanoha@microsoft.com>
ddfbaa5 to
f052db3
Compare
Signed-off-by: Tamilmani <tamanoha@microsoft.com>
b5bf75a to
0134df3
Compare
b5bf968 to
8c79a66
Compare
Signed-off-by: Tamilmani <tamanoha@microsoft.com>
8c79a66 to
ac7f244
Compare
This PR updates both CNS and CNI code to support apipa nic creation in swiftv2. The code has been refactored to construct apipa nic as separate entry in podIpInfo if either of allowhostonc or allownctohost set. CNI when it does RequestIPs call to CNS and CNS return apipa nic as separate entry in
PodIPInfo. This allows CNI to treat this as separate endpoint and align with current cni design/model of 1 nic per endpoint info. CNI then iterates through endpoint info and creates one nic at a time. NetworkContainerID is included in PodIPInfo as apipa endpoint creation gets details based on that. This is also required during delete as HNS endpoint for apipa is constructed based on networkcontainerid. AddedDeleteEndpointStateAPI in CNS to remove state when CNI delete call is invoked. DeleteEndpointState removes state from CNS statefile.CNS State looks like this:
Reason for Change:
Issue Fixed:
Requirements:
Notes: