-
Notifications
You must be signed in to change notification settings - Fork 367
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
Use iptables-wrapper in Antrea container #3276
Use iptables-wrapper in Antrea container #3276
Conversation
This was tested on Ubuntu 20.04 (default is "legacy") and Ubuntu 21.04 (default is "nft"). |
Codecov Report
@@ Coverage Diff @@
## main #3276 +/- ##
==========================================
+ Coverage 59.04% 60.08% +1.04%
==========================================
Files 331 331
Lines 28420 28420
==========================================
+ Hits 16781 17077 +296
+ Misses 9798 9478 -320
- Partials 1841 1865 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
|
build/images/base/Dockerfile
Outdated
rm -rf /var/lib/apt/lists/* && \ | ||
chmod +x /iptables-wrapper-installer.sh && \ | ||
/iptables-wrapper-installer.sh && \ | ||
rm -rf /iptables-wrapper-installer.sh |
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.
I saw the installer has the following:
# Cleanup
rm -f "$0"
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.
thanks, I removed the rm
command
377b766
to
4754d44
Compare
build/images/base/Dockerfile
Outdated
&& rm -rf /var/lib/apt/lists/* | ||
# See https://github.com/kubernetes-sigs/iptables-wrappers | ||
# /iptables-wrapper-installer.sh will have permissions of 600. | ||
# --chmod=644 doesn't work with older versions of Docker and requires DOCKER_BUILDKIT=1, so we use |
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.
Do you mean --chmod=755?
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.
I think I meant 700
, just need the owner to be able to execute the script. Let me fix it.
Instead of iptables directly. Antrea uses a Ubuntu 20.04 base container image, for which the default iptables mode is "legacy". This may not match the iptables mode for the Node OS, which in turn can create issues: * Other K8s components (kubelet, kube-proxy) will create rules using the default iptables mode for the Node. Assumptions about evaluation order between these rules and the Antrea rules may break. * The required kernel module for the "legacy" mode (ip_tables) may not be available on the Node. The iptables-wrapper is meant to address these issues: https://github.com/kubernetes-sigs/iptables-wrappers. We install it in the Antrea container image. The first time Antrea invokes iptables, the wrapper will determine the underlying iptables mode (for the Node OS) and adjust the iptables symlinks in the container. Fixes antrea-io#3243 Fixes antrea-io#3274 Signed-off-by: Antonin Bas <abas@vmware.com>
4754d44
to
c9ca8d6
Compare
/test-all |
/test-e2e |
/test-e2e |
/test-e2e unrelated failure: #3307. Maybe we could skip it if it still fails. |
Another unrelated failure:
I'll merge now |
Instead of iptables directly. Antrea uses a Ubuntu 20.04 base container image, for which the default iptables mode is "legacy". This may not match the iptables mode for the Node OS, which in turn can create issues: * Other K8s components (kubelet, kube-proxy) will create rules using the default iptables mode for the Node. Assumptions about evaluation order between these rules and the Antrea rules may break. * The required kernel module for the "legacy" mode (ip_tables) may not be available on the Node. The iptables-wrapper is meant to address these issues: https://github.com/kubernetes-sigs/iptables-wrappers. We install it in the Antrea container image. The first time Antrea invokes iptables, the wrapper will determine the underlying iptables mode (for the Node OS) and adjust the iptables symlinks in the container. Fixes antrea-io#3243 Fixes antrea-io#3274 Signed-off-by: Antonin Bas <abas@vmware.com>
Instead of iptables directly. Antrea uses a Ubuntu 20.04 base container image, for which the default iptables mode is "legacy". This may not match the iptables mode for the Node OS, which in turn can create issues: * Other K8s components (kubelet, kube-proxy) will create rules using the default iptables mode for the Node. Assumptions about evaluation order between these rules and the Antrea rules may break. * The required kernel module for the "legacy" mode (ip_tables) may not be available on the Node. The iptables-wrapper is meant to address these issues: https://github.com/kubernetes-sigs/iptables-wrappers. We install it in the Antrea container image. The first time Antrea invokes iptables, the wrapper will determine the underlying iptables mode (for the Node OS) and adjust the iptables symlinks in the container. Fixes antrea-io#3243 Fixes antrea-io#3274 Signed-off-by: Antonin Bas <abas@vmware.com>
Instead of iptables directly.
Antrea uses a Ubuntu 20.04 base container image, for which the default iptables
mode is "legacy". This may not match the iptables mode for the Node OS, which in
turn can create issues:
default iptables mode for the Node. Assumptions about evaluation order
between these rules and the Antrea rules may break.
available on the Node.
The iptables-wrapper is meant to address these issues:
https://github.com/kubernetes-sigs/iptables-wrappers. We install it in the
Antrea container image. The first time Antrea invokes iptables, the wrapper will
determine the underlying iptables mode (for the Node OS) and adjust the iptables
symlinks in the container.
Fixes #3243
Fixes #3274
Signed-off-by: Antonin Bas abas@vmware.com