Skip to content
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

don't process unsupported loadbalancers with mixed protocols #475

Merged
merged 1 commit into from
May 11, 2023

Conversation

aojea
Copy link
Member

@aojea aojea commented Feb 22, 2023

The external cloud provider controller for loadbalancers does not support Services with different protocols and most probably it will never support them, since most of the functionality and development for loadbalancers is being done in the ingress-gce project.

Current code assumes that is not possible to have multiple protocols in multiple places

// TODO: Make this more generic. Currently this method is only
// used to create firewall rules for loadbalancers, which have
// exactly one protocol, so we can never end up with a list of
// mixed TCP and UDP ports. It should be possible to use a
// single firewall rule for both a TCP and UDP lb.
IPProtocol: strings.ToLower(string(ports[0].Protocol)),
Ports: portRanges,
},

// GCP doesn't support multiple protocols for a single load balancer
protocol = svcPorts[0].Protocol

Code borrowed from the cloud-provider-aws, thanks

Ref: https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/1435-mixed-protocol-lb
Change-Id: Iaec2ee17ccdc7c55c613189d8a3708b5a62d5076

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 22, 2023
@aojea
Copy link
Member Author

aojea commented Feb 22, 2023

/assign @cezarygerard @bowei @thockin

@aojea
Copy link
Member Author

aojea commented Feb 22, 2023

/hold

wait for kubernetes/kubernetes#115966 to sync both patches

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 22, 2023
@aojea
Copy link
Member Author

aojea commented Feb 22, 2023

/assign @andrewsykim

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 15, 2023
@aojea
Copy link
Member Author

aojea commented Mar 15, 2023

kubernetes/kubernetes#115966 already merged
/unhold

/assign @jprzychodzen

@aojea
Copy link
Member Author

aojea commented Apr 28, 2023

@cezarygerard we need to get this merge to avoid confusion on users

@sftim
Copy link

sftim commented May 10, 2023

(Thanks for the PR)

providers/gce/gce_loadbalancer.go Outdated Show resolved Hide resolved
providers/gce/gce_loadbalancer_test.go Outdated Show resolved Hide resolved
providers/gce/gce_loadbalancer_test.go Show resolved Hide resolved
providers/gce/gce_loadbalancer_test.go Show resolved Hide resolved
The external cloud provider controller for loadbaancers does not
support Services with different protocols and most probably it
will never support them, since most of the functionality and
development for loadbalancers is being done in the ingress-gce
project.

Ref: kubernetes/enhancements#1435
Change-Id: Iaec2ee17ccdc7c55c613189d8a3708b5a62d5076
@k8s-ci-robot
Copy link
Contributor

@aojea: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-gcp-scenario-kops-simple 56834cc link false /test pull-cloud-provider-gcp-scenario-kops-simple

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.

@aojea
Copy link
Member Author

aojea commented May 11, 2023

@cezarygerard please review again and lgtm once you are ok

@cezarygerard
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2023
@k8s-ci-robot k8s-ci-robot merged commit feb2afe into kubernetes:master May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

8 participants