mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
for error case, return nil for SG
This commit is contained in:
parent
88aab6f67b
commit
faec1d7f46
@ -798,7 +798,7 @@ func (az *Cloud) reconcileSecurityGroup(clusterName string, service *v1.Service,
|
|||||||
// Get lbIP since we make up NSG rules based on ingress IP
|
// Get lbIP since we make up NSG rules based on ingress IP
|
||||||
lbIP := &lbStatus.Ingress[0].IP
|
lbIP := &lbStatus.Ingress[0].IP
|
||||||
if lbIP == nil {
|
if lbIP == nil {
|
||||||
return &sg, fmt.Errorf("No load balancer IP for setting up security rules for service %s", service.Name)
|
return nil, fmt.Errorf("No load balancer IP for setting up security rules for service %s", service.Name)
|
||||||
}
|
}
|
||||||
destinationIPAddress = *lbIP
|
destinationIPAddress = *lbIP
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user