-
Notifications
You must be signed in to change notification settings - Fork 256
feat: snat azure dns traffic to node ip in cns linux #3930
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
Conversation
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 modifies SNAT behavior for Azure DNS traffic in Linux podsubnet scenarios by changing the source IP from the primary subnet IP to the node IP, and removes conflicting iptables-legacy rules to prevent conflicts with iptables-nftables.
- Changes SNAT target from subnet primary IP to node IP for Azure DNS traffic
- Removes jump to SWIFT-POSTROUTING in iptables-legacy to avoid rule conflicts
- Adds support for iptables-legacy client interface to handle cleanup operations
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
cns/restserver/restserver.go | Adds iptablesLegacyClient interface and getter method |
cns/restserver/internalapi_windows.go | Implements unsupported legacy iptables for Windows |
cns/restserver/internalapi_linux_test.go | Updates tests to verify node IP usage and legacy rule deletion |
cns/restserver/internalapi_linux.go | Implements legacy iptables deletion and changes SNAT target to node IP |
cns/fakes/iptablesfake.go | Adds mock implementation for legacy iptables testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
9578ca5
to
8524b50
Compare
b1a7451
to
b8e0df6
Compare
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
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. |
…to node ip todo: snat windows podsubnet azure scenario to node ip vnetscale scenarios (cilium and azure) already snat to node ip roll out after cns iptables reconciliation goes in cni still writes snat to primary ip but it is superseded by cns' rules
8b45da6
b8e0df6
to
8b45da6
Compare
/azp run Azure Container Networking PR |
Azure Pipelines successfully started running 1 pipeline(s). |
Reason for Change:
Changes the ip CNS-added IPTables rules SNAT to from the primary ip to node ip for linux podsubnet scenarios (both azure and cilium cases). CNI-added iptables rules are not modified and windows behavior remains the same (will be modified in a future PR).
Issue Fixed:
Requirements:
Notes:
Tested: