Fix subnet annotation checking for Azure internal loadbalancer

This commit is contained in:
Pengfei Ni
2019-02-25 14:48:53 +08:00
parent 139a13d312
commit 8d0c5d9727
2 changed files with 66 additions and 1 deletions

View File

@@ -1538,7 +1538,7 @@ func requiresInternalLoadBalancer(service *v1.Service) bool {
func subnet(service *v1.Service) *string {
if requiresInternalLoadBalancer(service) {
if l, found := service.Annotations[ServiceAnnotationLoadBalancerInternalSubnet]; found {
if l, found := service.Annotations[ServiceAnnotationLoadBalancerInternalSubnet]; found && strings.TrimSpace(l) != "" {
return &l
}
}