-
Notifications
You must be signed in to change notification settings - Fork 303
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
Conversation
@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. In response to this:
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. |
There was a problem hiding this 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} |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
/lgtm |
[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 |
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