Skip to content

Commit d20e38f

Browse files
ivanmatmatioktalz
authored andcommitted
BUG/MINOR: fix ingress with same path and different ports
1 parent bb2625e commit d20e38f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/store/convert.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ func (n ingressNetworkingV1Strategy) ConvertIngress() *Ingress {
271271
if k8sPath.PathType != nil {
272272
pathType = string(*k8sPath.PathType)
273273
}
274-
pathKey := pathType + "-" + k8sPath.Path
274+
if k8sPath.Backend.Service == nil {
275+
logger.Errorf("backend in ingress '%s/%s' should have service but none found", n.ig.GetNamespace(), n.ig.GetName())
276+
continue
277+
}
278+
pathKey := pathType + "-" + k8sPath.Path + "-" + k8sPath.Backend.Service.Port.Name
275279
paths[pathKey] = &IngressPath{
276280
Path: k8sPath.Path,
277281
PathTypeMatch: pathType,

0 commit comments

Comments
 (0)