Unverified Commit 86ff044d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #56688 from karataliu/fix_azure_internallb_static

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix static IP issue for Azure internal LB **What this PR does / why we need it**: Fix regression for Azure internal LB with static IP support **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #56686 **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 923abd01 da8e85e2
...@@ -1134,9 +1134,13 @@ func deduplicate(collection *[]string) *[]string { ...@@ -1134,9 +1134,13 @@ func deduplicate(collection *[]string) *[]string {
func (az *Cloud) reconcilePublicIP(clusterName string, service *v1.Service, wantLb bool) (*network.PublicIPAddress, error) { func (az *Cloud) reconcilePublicIP(clusterName string, service *v1.Service, wantLb bool) (*network.PublicIPAddress, error) {
isInternal := requiresInternalLoadBalancer(service) isInternal := requiresInternalLoadBalancer(service)
serviceName := getServiceName(service) serviceName := getServiceName(service)
desiredPipName, err := az.determinePublicIPName(clusterName, service) var desiredPipName string
if err != nil { var err error
return nil, err if !isInternal && wantLb {
desiredPipName, err = az.determinePublicIPName(clusterName, service)
if err != nil {
return nil, err
}
} }
pips, err := az.ListPIPWithRetry() pips, err := az.ListPIPWithRetry()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment