Merge pull request #6620 from nic-6443/sticky-session-fix

Fix sticky session not set for host in server-alias annotation (#6448)
This commit is contained in:
Kubernetes Prow Robot 2020-12-15 03:47:48 -08:00 committed by GitHub
commit fe65e9d22f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 0 deletions

View file

@ -651,6 +651,15 @@ func (n *NGINXController) getBackendServers(ingresses []*ingress.Ingress) ([]*in
locs[host] = []string{}
}
locs[host] = append(locs[host], path.Path)
if len(server.Aliases) > 0 {
for _, alias := range server.Aliases {
if _, ok := locs[alias]; !ok {
locs[alias] = []string{}
}
locs[alias] = append(locs[alias], path.Path)
}
}
}
}
}