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

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

    XMLWordPrintable

Details

    • Moderate
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None

    Description

      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:

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: