Handle named (non-numeric) ports correctly (#7311)
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
This commit is contained in:
parent
bc220f7366
commit
5acc0ab622
4 changed files with 200 additions and 1 deletions
|
|
@ -988,6 +988,8 @@ func getIngressInformation(i, h, p interface{}) *ingressInformation {
|
|||
info.Service = ing.Spec.DefaultBackend.Service.Name
|
||||
if ing.Spec.DefaultBackend.Service.Port.Number > 0 {
|
||||
info.ServicePort = strconv.Itoa(int(ing.Spec.DefaultBackend.Service.Port.Number))
|
||||
} else {
|
||||
info.ServicePort = ing.Spec.DefaultBackend.Service.Port.Name
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1022,6 +1024,8 @@ func getIngressInformation(i, h, p interface{}) *ingressInformation {
|
|||
info.Service = rPath.Backend.Service.Name
|
||||
if rPath.Backend.Service.Port.Number > 0 {
|
||||
info.ServicePort = strconv.Itoa(int(rPath.Backend.Service.Port.Number))
|
||||
} else {
|
||||
info.ServicePort = rPath.Backend.Service.Port.Name
|
||||
}
|
||||
|
||||
return info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue