Fix nginx ingress variables for definitions with Backend
This commit is contained in:
parent
0b6d115236
commit
77234fcde0
3 changed files with 91 additions and 41 deletions
|
|
@ -890,14 +890,21 @@ func getIngressInformation(i, h, p interface{}) *ingressInformation {
|
|||
}
|
||||
|
||||
for _, rPath := range rule.HTTP.Paths {
|
||||
if path == rPath.Path {
|
||||
info.Service = rPath.Backend.ServiceName
|
||||
if rPath.Backend.ServicePort.String() != "0" {
|
||||
info.ServicePort = rPath.Backend.ServicePort.String()
|
||||
}
|
||||
if path != rPath.Path {
|
||||
continue
|
||||
}
|
||||
|
||||
if info.Service != "" && rPath.Backend.ServiceName == "" {
|
||||
// empty rule. Only contains a Path and PathType
|
||||
return info
|
||||
}
|
||||
|
||||
info.Service = rPath.Backend.ServiceName
|
||||
if rPath.Backend.ServicePort.String() != "0" {
|
||||
info.ServicePort = rPath.Backend.ServicePort.String()
|
||||
}
|
||||
|
||||
return info
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue