-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
socket-LB: Terminate pod netns connections to deleted service backends #33459
socket-LB: Terminate pod netns connections to deleted service backends #33459
Conversation
/test |
1 similar comment
/test |
959acde
to
a5cc4a5
Compare
/test |
a5cc4a5
to
2901d27
Compare
/test |
2901d27
to
5735d56
Compare
/test |
5735d56
to
4c22991
Compare
/test |
5cda92b
to
492958f
Compare
Fixed up rebase. |
/test |
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.
LGTM!
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.
LGTM. So w/r/t #25169 we took an approach where we don't necessary join the host mount ns, but just mount in the namespace dir stead?
I see there's open discussion threads, feel free to drop the label when those are resolved. |
#25169 resolved the issue in the root netns. This PR resolves the issue for pod network namespaces by mounting the netns dir so that the agent can terminate stale sockets by entering pod network namespaces. |
There's still two threads that should be resolved in GitHub UI before we merge, but it seems tentatively like the content of those threads is resolved. I'm fine with following up with a commit to document the capabilities dependency in the YAML after this PR. |
Signed-off-by: Aditi Ghag <aditi@cilium.io>
This is required to be able to exec into pod network namespaces by opening `/var/run/netns/<pod-netns>`. The current use case is to be able to terminate stale pod connections when socket-Lb is enabled. Signed-off-by: Aditi Ghag <aditi@cilium.io>
Extension of PR#25169 [1] to terminate pod netns connections to deleted service backends in pod network namespaces. [1] cilium#25169 Signed-off-by: Aditi Ghag <aditi@cilium.io>
Update the section as the agent now terminates stale connections in pod network namespaces as well. Signed-off-by: Aditi Ghag <aditi@cilium.io>
492958f
to
80295a9
Compare
Switching into non-root network namespaces requires SYS_ADMIN permissions. The health endpoint infrastructure has had this dependency, socket-LB will have a similar requirement. Suggested-by: Daniel Borkmann <daniel@iogearbox.net> Suggested-by: Sebastian Wicki <sebastian@isovalent.com> Signed-off-by: Aditi Ghag <aditi@cilium.io>
80295a9
to
f677fba
Compare
/test |
Extension of #25169 to terminate connections to deleted service backends in pod network namespaces.
Testing:
Manually tested with starting a pair of UDP server and pod applications, and deleted the service backend.
Fixes: #27300