Kubernetes ingress provider to search via all endpoints

This commit is contained in:
Martin Vizvary 2021-04-15 18:16:04 +02:00 committed by GitHub
parent be81ce244e
commit 5814ba5322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 1 deletions

View file

@ -539,7 +539,7 @@ func loadService(client Client, namespace string, backend networkingv1beta1.Ingr
}
if port == 0 {
return nil, errors.New("cannot define a port")
continue
}
protocol := getProtocol(portSpec, portName, svcConfig)
@ -553,6 +553,10 @@ func loadService(client Client, namespace string, backend networkingv1beta1.Ingr
}
}
if len(svc.LoadBalancer.Servers) == 0 {
return nil, errors.New("no valid subset found")
}
return svc, nil
}