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

Helm Chart installation screen fails to render if JSON schema contains remote $refs

XMLWordPrintable

    • Moderate
    • No
    • ODC Sprint 241
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

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

      Description of problem:

      In Helm Charts we define a values.schema.json file - a JSON schema for all the possible values the user can set in a chart. This schema needs to follow JSON schema standard. The standard includes something called $ref - a reference to the either local or remote definition. If we use a schema with remote references in OCP, it causes various troubles in OCP. Different OCP versions gives different results, also on the same OCP version you can get different results based on how tight down the cluster networking is.

      Prerequisites (if any, like setup, operators/versions):

      Tried in Developer Sandbox, OpenShift Local, Baremetal Public Cluster in Operate First, OCP provisioned through clusterbot. It behaves differently in each instance. Individual cases are described below.

      Steps to Reproduce

      1. Go to the "Helm" tab in Developer Perspective
      2. Click "Create" in top right and select "Repository"
      3. Use following ProjectHelmChartRepository resource and click "Create" (this repo contains single chart, this chart has values.schema.json with content linked below):

      apiVersion: helm.openshift.io/v1beta1
      kind: ProjectHelmChartRepository
      metadata:
        name: reproducer
      spec:
        connectionConfig:
          url: https://raw.githubusercontent.com/tumido/helm-backstage/reproducer
      

      4. Go back the "Helm" tab in Developer Perspective
      5. Click "Create" in top right and select "Helm Release"
      6. In filters section of the catalog in the "Chart repositories" select "Reproducer"
      7. Click on the single tile available (Backstage)
      8. Click "Install Helm Chart"
      9. Either you will be greeted with various error screens or you see the "YAML view" tab (this tab selection is not the default and is remembered during user session only I suppose)
      10. Select "Form view"

      Actual results:

      Various error screens depending on OCP version and network restrictions. I've attached screen captures how it behaves in different settings.

      Expected results:

      Either render the form view (resolve remote references) or make it obvious that remote references are not supporter. Optionally fallback to the "YAML view" regarding that user doesn't have full schema available, but the chart is still deployable.

      Reproducibility (Always/Intermittent/Only Once):

      Depends on the environment
      Always in OpenShift Local, Developer Sandbox, cluster bot clusters

      Build Details:

      Workaround:

      1. Select any other chart to install, click "Install Helm Chart"
      2. Change the view to "YAML view"
      3. Go back to the Helm catalog without actually deploying anything
      4. Select the faulty chart and click "Install Helm Chart"
      5. Proceed with installation

      Additional info:

            rh-ee-lprabhu Lokananda Prabhu
            tcoufal@redhat.com Tom Coufal
            Sanket Pathak Sanket Pathak
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: