-
Notifications
You must be signed in to change notification settings - Fork 277
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
fix: use zones in the pre-existing frontend IP configurations for int… #1070
Conversation
pkg/provider/azure_test.go
Outdated
@@ -1620,6 +1620,13 @@ func getInternalTestService(identifier string, requestedPorts ...int32) v1.Servi | |||
svc.Annotations[consts.ServiceAnnotationLoadBalancerInternal] = consts.TrueAnnotationValue | |||
return svc | |||
} | |||
func getInternalTestServiceWithAnnotation(identifier string, annotations map[string]string, requestedPorts ...int32) v1.Service { |
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.
How about implementing factory logic in getInternalTestServiceWithAnnotation and refactoring getInternalTestService instead? Other functions may reuse logics in annotations without duplicating service generation logic.
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.
yes, that should help for new test suites
/retest |
1 similar comment
/retest |
pkg/provider/azure_loadbalancer.go
Outdated
} | ||
if isInternal && az.useStandardLoadBalancer() && len(zones) > 0 && !az.HasExtendedLocation() { | ||
newConfig.Zones = &zones | ||
if !isFipChanged { // fetch zone information from API for new frontends |
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.
Could we wrap those new lines in a new function?
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.
done
@@ -1620,6 +1620,13 @@ func getInternalTestService(identifier string, requestedPorts ...int32) v1.Servi | |||
svc.Annotations[consts.ServiceAnnotationLoadBalancerInternal] = consts.TrueAnnotationValue | |||
return svc | |||
} |
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.
gofmt the file? there should be an empty line between each functions
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.
done
Could you fix the version in https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/pkg/azureclients/loadbalancerclient/interface.go#L29 together? |
fixed |
/retest |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feiskyer, nilo19 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 |
[release-1.1] Cherry pick of #1070 to release-1.1
[release-1.23] Cherry pick of #1070 to release-1.23
…ernal LBs
What type of PR is this?
/kind bug
What this PR does / why we need it:
Keep the AZ in the pre-existing frontend IP configurations of internal LBs instead of always calling the zone API.
Which issue(s) this PR fixes:
Fixes #1047
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: