Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-12272

Importing a kn Service shows a non-working Open URL decorator also when the Add Route checkbox was unselected

XMLWordPrintable

    • No
    • ODC Sprint 236
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-11057. The following is the description of the original issue:

      Description of problem:
      When import a Serverless Service from a git repository the topology shows an Open URL decorator also when "Add Route" checkbox was unselected (which is selected by default).

      The created kn Route makes the Service available within the cluster and the created URL looks like this: http://nodeinfo-private.serverless-test.svc.cluster.local

      So the Service is NOT accidentally exposed. It's "just" that we link an internal route that will not be accessible to the user.

      This might happen also for Serverless functions import flow and the import container image import flow.

      Version-Release number of selected component (if applicable):
      Tested older versions and could see this at least on 4.10+

      How reproducible:
      Always

      Steps to Reproduce:

      1. Install the OpenShift Serverless operator and create the required kn Serving resource.
      2. Navigate to the Developer perspective > Add > Import from Git
      3. Enter a git repository (like https://gitlab.com/jerolimov/nodeinfo
      4. Unselect "Add Route" and press Create

      Actual results:
      The topology shows the new kn Service with a Open URL decorator on the top right corner.

      The button is clickable but the target page could not be opened (as expected).

      Expected results:
      The topology should not show an Open URL decorator for "private" kn Routes.

      The topology sidebar shows similar information, we should maybe release the Link there as well with a Text+Copy button???

      A fix should be tested as well with Serverless functions as container images!

      Additional info:
      When the user unselects the "Add route" option an additional label is added to the kn Service. This label could also be added and removed later. When this label is specified the Open URL decorator should not be shown:

      metadata:
        labels:
          networking.knative.dev/visibility: cluster-local
      

      See also:

      https://github.com/openshift/console/blob/1f6e238b924f4a4337ef917a0eba8aadae161e9c/frontend/packages/knative-plugin/src/utils/create-knative-utils.ts#L108

      https://github.com/openshift/console/blob/1f6e238b924f4a4337ef917a0eba8aadae161e9c/frontend/packages/knative-plugin/src/topology/components/decorators/getServiceRouteDecorator.tsx#L15-L21

              avik6028 Avik Kundu
              openshift-crt-jira-prow OpenShift Prow Bot
              Sanket Pathak Sanket Pathak
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: