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

Support specifying more than 5 ports in L4 ILB service #99595

Merged
merged 1 commit into from Mar 8, 2021

Conversation

prameshj
Copy link
Contributor

@prameshj prameshj commented Mar 1, 2021

Added logic to set AllPorts field if more than 5 ports are specified.

What type of PR is this?

/kind bug

What this PR does / why we need it:

Currently, the k8s spec allows specifying more than 5 ports in the service spec, but ILB creation fails due to ForwardingRule limitation. This PR fixes the issue by setting the "AllPorts" field when more than 5 ports are specified.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

GCE L4 Loadbalancers now handle > 5 ports in service spec correctly.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 1, 2021
@prameshj
Copy link
Contributor Author

prameshj commented Mar 1, 2021

/assign @freehan @MrHohn

Copy link
Member

@MrHohn MrHohn left a comment

Choose a reason for hiding this comment

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

The code changes look good, having a comment about eventing.

@@ -187,6 +189,10 @@ func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v
if options.AllowGlobalAccess {
newFwdRule.AllowGlobalAccess = options.AllowGlobalAccess
}
if len(ports) > maxL4ILBPorts {
newFwdRule.Ports = nil
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to surface a warning/event that all ports are configured now despite the given ports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The firewall rules are added only for the specified ports, so traffic from clients to any non-listed ports will not work. We can add an Info event in any case.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, in that sense it might be fine.

@prameshj
Copy link
Contributor Author

prameshj commented Mar 1, 2021

/retest

@MrHohn
Copy link
Member

MrHohn commented Mar 1, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 1, 2021
@prameshj
Copy link
Contributor Author

prameshj commented Mar 1, 2021

/retest

@prameshj
Copy link
Contributor Author

prameshj commented Mar 1, 2021

/test pull-kubernetes-verify

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Mar 1, 2021

@prameshj: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-bazel-test 65fcc6296d86899708cbafea4afed90a2001e9b3 link /test pull-kubernetes-bazel-test
pull-kubernetes-bazel-build 65fcc6296d86899708cbafea4afed90a2001e9b3 link /test pull-kubernetes-bazel-build

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.

Added logic to set AllPorts field if more than 5 ports are specified.
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/cloudprovider sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Mar 1, 2021
@MrHohn
Copy link
Member

MrHohn commented Mar 1, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 1, 2021
@prameshj
Copy link
Contributor Author

prameshj commented Mar 2, 2021

/assign @andrewsykim

@prameshj
Copy link
Contributor Author

prameshj commented Mar 5, 2021

/assign @cheftako

@cheftako
Copy link
Member

cheftako commented Mar 8, 2021

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, MrHohn, prameshj

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 Mar 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 763514f into kubernetes:master Mar 8, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Mar 8, 2021
@andrewsykim
Copy link
Member

Sorry for the late response, ack that this is a bug fix, thanks @prameshj

@andrewsykim
Copy link
Member

Can you update release notes to indicate what this is fixing?

@prameshj
Copy link
Contributor Author

prameshj commented Mar 8, 2021

Thanks Andrew. Do I just update the release-notes section in this PR?

@cheftako
Copy link
Member

cheftako commented Mar 9, 2021

Thanks Andrew. Do I just update the release-notes section in this PR?

Yup :D

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 10, 2021
k8s-ci-robot added a commit that referenced this pull request Apr 8, 2021
…595-upstream-release-1.20

Automated cherry pick of #99595: Support > 5 ports in L4 ILB.
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. area/cloudprovider 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

None yet

6 participants