-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Service port compatibility check accounts for TCP/UDP differentiation #34691
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
@dylandreimerink Would you mind taking look at this PR? You have the most context on #34677 |
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.
Thank you! This is great, just want to simplify a little
I have two requests that I forgot to add to the initial review. The first being, could you please add a test case. We already have one that asserts the non-overlapping ports, you should be able to copy it and modify it, set the service differentiation setting in the new case and make the two services use UDP and TCP on the same port, assert they get the same IP assigned. cilium/operator/pkg/lbipam/lbipam_test.go Line 241 in 1cb9b66
My second request is to slightly change the way we plumb in the service differentiation setting. The current way uses the global variable, which may cause issues during testing since changing it persists across test cases. What I suggest instead is to use the config object that is already provided. cilium/operator/pkg/lbipam/cell.go Line 59 in 1cb9b66
You can add a new boolean here for the setting and set it here Finally, add a new boolean to the I hope that made sense 😅. Its a few additional lines of code, but it makes this piece of code easier to test without the global variable usage, so worth it |
hi @dylandreimerink, I have improved this PR, but I didn’t use the DaemonConfig you mentioned. I’m not sure if this is correct. |
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.
This is what I was after, thank you!
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.
looks good, thank you
/test |
/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. Thanks!
/test |
fixes: cilium#34677 Signed-off-by: cx <1249843194@qq.com>
fixes: cilium#34677 Signed-off-by: cx <1249843194@qq.com>
fixes: cilium#34677 Signed-off-by: cx <1249843194@qq.com>
ddbc9d7
to
2d8f204
Compare
Let's see if a rebase helps to resolve the one CI fail in e2e-upgrade. |
/test |
fixes: #34677