Skip to content

Support mixed protocol LBs#75831

Closed
kiall wants to merge 1 commit intokubernetes:masterfrom
kiall:multi-protocol-lb
Closed

Support mixed protocol LBs#75831
kiall wants to merge 1 commit intokubernetes:masterfrom
kiall:multi-protocol-lb

Conversation

@kiall
Copy link

@kiall kiall commented Mar 28, 2019

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds support for configuring a service of type LoadBalancer with more than 1 protocol. For example, this allows configuring a LoadBalancer with both TCP and UDP port 53 (for a DNS server), or TCP and UDP 443 for HTTPS + QUIC (HTTP 3.0).

Which issue(s) this PR fixes:

Fixes #23880

Special notes for your reviewer:

Mixed protocol LBs are supported by Azure and MetalLB. Other providers MAY support this, however, I'm unable to verify the implementations and have opted to reject mixed protocol LBs on these CPIs where necessary (this turned out to only need rejection in the GCP provider)

An example service to enable and use this feature:

apiVersion: v1
kind: Service
metadata:
  name: mixed-protocol
spec:
  type: LoadBalancer
  ports:
    - name: dns-udp
      port: 53
      protocol: UDP
    - name: dns-tcp
      port: 53
      protocol: TCP
  selector:
    app: my-dns-server

If the feature gate is enabled, while a CPI without support is enabled, the following event will be recorded:

 Type     Reason                      Age                   From                Message
 ----     ------                      ----                  ----                -------
 Warning  CreatingLoadBalancerFailed  112s (x71 over 32m)   service-controller  Error creating load balancer (will retry): failed to ensure load balancer for service default/mixed-protocol: Cannot create an GCP load balancer with mixed protocols

Does this PR introduce a user-facing change?:

Added support for mixed protocol services of type=LoadBalancer, enabled through the use of a new `ServiceLoadBalancerMixedProtocol` feature gate.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 28, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @kiall. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot requested review from anguslees and dims March 28, 2019 13:37
@k8s-ci-robot k8s-ci-robot added area/cloudprovider sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 28, 2019
@grahamhayes
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 28, 2019
@kiall kiall force-pushed the multi-protocol-lb branch 2 times, most recently from 311d585 to 634c753 Compare March 29, 2019 14:13
@itsc0lin
Copy link

itsc0lin commented Apr 3, 2019

would welcome support for this!

@mattkeeler
Copy link

It would be great to have support for mixed protocol LBs.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 11, 2019
@andyzhangx
Copy link
Member

@kiall any progress on this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you expand a little on the reasoning for an annotation? A check if a Service contains ports for more than one protocol shouldn't be too hard to write and could be used as a basis for having providers that do not support that emit an event. Or are there more reasons for having it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really, I think the annotation should be little more than a stopgap measure to handle compatibility and allow people (i.e. CPI vendors) time to update - I gave some detail in the PR message above.

@feiskyer
Copy link
Member

I decided to make this feature opt-in via the annotation, however I believe that is the wrong approach long term.

For new features, it's preferable to add a feature gate instead of annotations. For the first release, it may be alpha so that users can try it. And in later beta releases, enable it by default.

@alvaroaleman
Copy link
Member

@kiall Do you currently have the capacity to continue with this? Else I'd like to go ahead and write a KEP for the validation changes to make sure we manage to get this in within the 1.17 cycle

@Hyzhou
Copy link
Contributor

Hyzhou commented Oct 8, 2019

Any update? Some game developer deploy their application used mixed protocols. when use the k8s to deploy it, mixed protocols was not supported in service.
If not to merge this PR. If we have another way to support this feature.

@adampl
Copy link

adampl commented Nov 25, 2019

Does it really need a KEP and a feature gate? Looks more like a bugfix to me.

@dcbw
Copy link
Contributor

dcbw commented Dec 12, 2019

Tim says it was originally disabled because there were possibilities for "being charged twice" depending on your cloud provider. Also Tim wants it to be opt-in.

We need a KEP for this first to explore the issues and proposed solutions.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2019
@k8s-ci-robot
Copy link
Contributor

@kiall: PR needs rebase.

Details

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.

@adampl
Copy link

adampl commented Dec 12, 2019

But "being charged twice" is possible only if someone enabled this in their config, so what's the problem? And who cares that some cloud provider can't do their job right?

@DreamRivulet
Copy link

Any update on this? without this, we have to create several service for each port, which is inconvenient.

@xiaoxubeii
Copy link
Contributor

Any updates? We also really need mixed protocal.

@jrx-sjg
Copy link

jrx-sjg commented Jan 3, 2020

Oh my god, can anyone solve the conflicts? We really need mixed protocols for our SIP infrastructure.

@janosi
Copy link
Contributor

janosi commented Jan 8, 2020

The KEP pull request is on its way to kubernetes/enhancements. Please check and comment.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 7, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 7, 2020
@prestonvanloon
Copy link

prestonvanloon commented May 7, 2020 via email

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label May 7, 2020
@alvaroaleman
Copy link
Member

@prestonvanloon I don't think there is much point in keeping this PR open, there is a KEP for this, discussion should continue there: kubernetes/enhancements#1438 or the issue at #23880

@prestonvanloon
Copy link

prestonvanloon commented May 7, 2020 via email

@cmluciano
Copy link

Let's continue discussion in #23880 since there is now a merged KEP added

/close

@k8s-ci-robot
Copy link
Contributor

@cmluciano: Closed this PR.

Details

In response to this:

Let's continue discussion in #23880 since there is now a merged KEP added

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cloudprovider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support mixed protocols in service.type=loadbalancer