Bug 1763340

Summary: Incorrect reconciliation of OpenShift Route based on K8s Ingress
Product: OpenShift Container Platform Reporter: Daneyon Hansen <dhansen>
Component: NetworkingAssignee: Miciah Dashiel Butler Masters <mmasters>
Networking sub component: router QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aanjarle, aos-bugs, dhansen, dmace, gferrazs, hongli, mmasters
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: An Ingress object specifies backends, where each backend specifies a target port name or number on some Service object. The Service's port in turn specifies a target port on a Pod object. Similarly to an Ingress backend, a Route object may specify a target port on a Service. When translating an Ingress backend to a Route, the ingress-to-route controller used the Service port's target port for the Route's target port when it should have used the Service port's name or number. Consequence: If an Ingress object used a Service port that had a target port with a different name or number from the Service port's name or number, the ingress-to-route controller could produce an invalid Route object. Fix: When translating the target port of an Ingress backend to the target port for a Route, the ingress-to-route controller now uses the Service port's name rather than its target port, or omits the target port entirely if it is not needed (as in the case of a Service that has only 1 port). Result: Ingress objects are now correctly translated to Route objects even if an Ingress backend targets a Service port that has a different name or number from the Service port's target port.
Story Points: ---
Clone Of: 1760776 Environment:
Last Closed: 2020-06-17 20:21:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1760776, 1817463, 1835480    
Bug Blocks:    

Comment 1 Miciah Dashiel Butler Masters 2020-03-26 16:52:24 UTC
*** Bug 1817463 has been marked as a duplicate of this bug. ***

Comment 2 Miciah Dashiel Butler Masters 2020-05-09 02:07:02 UTC
I'll work on the 3.11 backport this sprint.

Comment 4 Miciah Dashiel Butler Masters 2020-05-26 13:15:49 UTC
The 3.11 backport is posted but not merged; I am trying to get it past some CI issues.  PR: https://github.com/openshift/origin/pull/24971

Comment 7 Hongan Li 2020-06-10 07:23:18 UTC
verified with atomic-openshift-3.11.232-1.git.0.a5bc32f.el7 and issue has been fixed.

follow the reproduce steps and the route is created as below:

<---snip--->
  spec:
    host: app.test.com
    path: /
    port:
      targetPort: http-default
    to:
      kind: Service
      name: app

Comment 9 errata-xmlrpc 2020-06-17 20:21:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2477