Fix incorrect behaviour with multi-port endpoint subsets

This commit is contained in:
Jakub Coufal 2021-05-28 00:58:07 +02:00 committed by GitHub
parent 376b6f90d9
commit 1680f00091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 80 additions and 1 deletions

View file

@ -529,8 +529,8 @@ func loadService(client Client, namespace string, backend networkingv1beta1.Ingr
return nil, errors.New("subset not found")
}
var port int32
for _, subset := range endpoints.Subsets {
var port int32
for _, p := range subset.Ports {
if portName == p.Name {
port = p.Port