-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Allow for mixed UDP/TCP ports on LoadBalancer Services #64471
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Miouge1 Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
We should also add some ut . Also implementation wise is there any technical blockers to doing this |
@Miouge1: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
It's not that "not all implementations support it", it's that almost all implementations (as far as I know) do NOT support it. I would like to be able to allow this, but it would be just another source of support issues when people try to bridge environments. This could be an implementation-specific annotation, which could build support for an argument that it IS portable, but to the best of my knowledge it is not. @kubernetes/sig-network-api-reviews Does anyone else have evidence that this works in more places than I know? |
+1 to support this with annotation |
Is the idea an annotation like: |
Coming at this problem from the "I've maintained load-balancers" side of the fence, I find this surprising. My expectation going in was that the GCP integration is the aberration. If the LB implementation supports TCP and UDP, I don't see why they wouldn't allow mixing the two in one Service. If the argument is that most LBs only support TCP... Then we already have a support problem, because I can already tell k8s to create a UDP-only balancer, and that will presumably fail. Allowing mixed protocols doesn't change that surface, the LB implementation is still free to log a sadness event on the service and fail to converge it, or add an admission check to eagerly reject things. As a point of reference, I did things the annotation way in MetalLB, and in my corner of the universe, this constraint of k8s generates an ongoing trickle of people confused that they need to resort to declarative hacks (2 services and implementation-specific annotations) to express something that their mental model says should be trivial. @thockin What would it take to satisfy you that the proposed lack-of-constraint makes sense for the majority of k8s users? If I know what data we'd need, I'd be happy to go collect it (and possibly be proved wrong, I'm aware that I'm coming from a place of assumptions here). But if we're going to move the status quo, I'd rather move it towards a more intuitively sensible API than to enshrine vendor-specific hacks. |
Build the matrix: GCP: Of those how many support mixed protocols? Of the out-of-tree clouds (alibaba, huawei, IBM, DigitalOcean, maybe others), how many support mixed protocols? I don't LIKE being overly minimalist. I want this to work, so show me it will work for more people than it will fail for. |
It seems silly to impose this very artificial limitation on all platforms (but particularly MetalLB) simply because some [cloud] platforms don't support it. |
As a MetalLB user, I'm stumbling on this issue. I understand @thockin 's point. I also think that allowing an override of this check via an annotation would be very helpful for those of us who are using 'balancing' methods that support both tcp and udp (e.g., MetalLB). |
Maybe this check can be done on per LB provider basis. As I know, there is already interface for LBs. So, that interface should include method to show if LB can or can not do mixed protocols. |
Wait, so the reason this isn't supported is because cloud providers aren't doing it? That's the ONLY reason? That is very dumb. Who cares what they're doing? For those coming into this thread fresh and using MetalLB, I got around this by creating two separate services of type For each service, it will be necessary to pass an annotation allowing said service to have the same IP as another service.
|
Kinda surprised this is still a thing |
Another pass at this with opt in to make it more acceptable! #75831 |
This is exactly what I needed to get RPI cluster running. Thanks. |
I'd like to add that this feature is really needed In our use case we don't want to manually manage IPs so we let MetalLB assign IPs to services and we use CoreDNS to resolve the external IP. In that scenario, being forced to define 2 services means
|
bump |
OpenStack supports UDP loadbalancing as of kubernetes/cloud-provider-openstack#844 via kubernetes/cloud-provider-openstack@594b9a3 |
bump |
1 similar comment
bump |
The issue is closed, bumping will do nothing. If you have new data, open a new bug and please stop spamming everyone subscribed to this one. Thanks! |
bump |
you can track the development of this feature in kubernetes/enhancements#1435 (comment) Please, don't "bump" issues 😄 |
What this PR does / why we need it:
Allows for LoadBalancer Services to have both TCP and UDP ports.
Some LoadBalancer implementations support mixed TCP and UDP services on a single Service of type=LoadBalancer, like metallb.
So far users are forced to workaround this by creating 2 services like so:
Instead of a clearer service manifest:
Which issue(s) this PR fixes
Fixes #23880, #35752
Special notes for your reviewer:
This is kind of like if the
Ingress
manifests didn't allow for mixed HTTP and HTTPS Ingress because not all Ingress controller implementation supported it.Release note: