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

Allow modifying protocol in L4 ILB service #1204

Merged
merged 2 commits into from
Aug 6, 2020

Conversation

prameshj
Copy link
Contributor

@prameshj prameshj commented Aug 3, 2020

Protocol modification requires forwarding rule to be deleted before backend service update. Forwarding rule will also reuses the IP from service
status, to avoid IP address change due to proto change.

Other changes:
Also use GA API for forwarding rule creation always since Global Access is GA.
Remove feature gate logic for Custom Subnet.
Simplified Forwarding Rule Equality Logic. If the IP address in old and new FR do not match,
it is considered to be a change. Special case for empty IP removed.

/assign @freehan @skmatti

@k8s-ci-robot
Copy link
Contributor

@prameshj: GitHub didn't allow me to assign the following users: skmatti.

Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

Protocol modification requires forwarding rule to be deleted before backend service update. Forwarding rule will also reuses the IP from service
status, to avoid IP address change due to proto change.

Other changes:
Also use GA API for forwarding rule creation always since Global Access is GA.
Remove feature gate logic for Custom Subnet.
Simplified Forwarding Rule Equality Logic. If the IP address in old and new FR do not match,
it is considered to be a change. Special case for empty IP removed.

/assign @freehan @skmatti

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 added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 3, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 3, 2020
Copy link
Contributor

@freehan freehan left a comment

Choose a reason for hiding this comment

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

just nits

LGTM

@@ -265,6 +265,8 @@ func (b *Backends) EnsureL4BackendService(name, hcLink, protocol, sessionAffinit
}
if protocol == string(api_v1.ProtocolTCP) {
expectedBS.ConnectionDraining = &composite.ConnectionDraining{DrainingTimeoutSec: DefaultConnectionDrainingTimeoutSeconds}
} else {
expectedBS.ConnectionDraining = &composite.ConnectionDraining{DrainingTimeoutSec: 0}
Copy link
Contributor

Choose a reason for hiding this comment

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

add a comment here to explain why timeout config for UDP is 0

@@ -284,7 +286,7 @@ func (b *Backends) EnsureL4BackendService(name, hcLink, protocol, sessionAffinit
if backendSvcEqual(expectedBS, bs) {
return bs, nil
}
if bs.ConnectionDraining != nil && bs.ConnectionDraining.DrainingTimeoutSec > 0 {
if bs.ConnectionDraining != nil && bs.ConnectionDraining.DrainingTimeoutSec > 0 && protocol == string(api_v1.ProtocolTCP) {
Copy link
Contributor

Choose a reason for hiding this comment

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

add a comment:

only preserves user config timeout value when the protocol is TCP

Protocol modification results in forwarding rule being delete before
backend service update. Forwarding rule reuses the IP from service
status, to avoid IP address change due to proto change.

Other changes:
Also use GA API for forwarding rule creation always since Global Access is GA.
Remove feature gate logic for Custom Subnet.
Simplified Forwarding Rule Equality Logic. If the IP address in old and new FR do not match,
it is considered to be a change. Special case for empty IP removed.
@freehan
Copy link
Contributor

freehan commented Aug 6, 2020

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: freehan, 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 Aug 6, 2020
@k8s-ci-robot k8s-ci-robot merged commit 2333839 into kubernetes:master Aug 6, 2020
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.

None yet

3 participants