-
Notifications
You must be signed in to change notification settings - Fork 257
Add default route only when skipdefaultroutes flag to false in dualni… #4043
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
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: tamilmani1989 <[email protected]> Signed-off-by: Paul Yu <[email protected]>
Co-authored-by: tamilmani1989 <[email protected]> Signed-off-by: Paul Yu <[email protected]>
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 adds conditional logic to prevent default routes from being added when the SkipDefaultRoutes
flag is set to true in dual NIC scenarios. This prevents duplicate default routes from being given to the Host Network Service (HNS).
Key changes:
- Extracted default route creation logic into a reusable function
- Added conditional check for
SkipDefaultRoutes
flag before adding default routes - Enhanced test coverage with a new test case for the skip scenario
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
cni/network/multitenancy.go | Refactored default route logic into addDefaultRoute method and added conditional check for SkipDefaultRoutes flag |
cni/network/multitenancy_test.go | Updated existing test case name and added new test case to verify behavior when SkipDefaultRoutes=true |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
…c scenario
Reason for Change:
This PR is to add the default route only when skipdefaultroutes flag set to false in dualnic scenario
Issue Fixed:
Requirements:
Notes: