-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
add mixed protocol support for azure load balancer #67986
add mixed protocol support for azure load balancer #67986
Conversation
} | ||
|
||
if serviceapi.NeedsHealthCheck(service) { | ||
if port.Protocol == v1.ProtocolSCTP { |
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.
getProtocolsFromKubernetesProtocol()
has already checked this, so the check is not needed here
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.
removed in new commit, PTAL, thanks.
92dd273
to
6992f19
Compare
lbFrontendIPConfigID string, | ||
lbBackendPoolID string, | ||
lbName string, | ||
lbIdleTimeout *int32) error { |
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.
nit: move expectedProbes
and expectedRules
to return so that it's much more easier to read
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.
I have moved all lb rule and probe creation logic into a new func, that would be more clear
@@ -948,6 +894,86 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, | |||
return lb, nil | |||
} | |||
|
|||
func (az *Cloud) createLoadBalancerRule( |
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.
it does not actually create a rule, could we rename it to reconcileLoadBalancerRule
?
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.
fixed
add logging fix lb issue fix comments make code more clean
c404ce8
to
815d4ba
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, feiskyer 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 |
/retest |
/test all Tests are more than 96 hours old. Re-running tests. |
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.
/milestone v1.12
Automatic merge from submit-queue (batch tested with PRs 67986, 68210, 67817). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. |
What this PR does / why we need it:
If user specify
service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: "true"
, azure cloud provider will create both TCP and UDP lb rules, for more details, could refer to #66887Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #66887
Special notes for your reviewer:
original
reconcileLoadBalancer
func is too big, I move part of code implementation to a standalone funccreateLoadBalancerRule
example service config:
Release note:
/kind feature
/sig azure
/assign @feiskyer @khenidak