Commit da8e85e2 authored by Dong Liu's avatar Dong Liu

Fix static IP issue for Azure internal LB

parent 16027080
...@@ -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