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

Enum values are not shown in ExploreType component

XMLWordPrintable

    • None
    • None
    • None
    • Proposed
    • Bug Fix
    • Previously, the resource schema explorer did not show the possible values if the schema indicated that a field is an enum. With this release, the resource schema explorer now shows all possible enum values when available.
    • None
    • None
    • None
    • None

      1. Proposed title of this feature request

      Show possible and default enum field values in YAML editor sidebar

      2. What is the nature and description of the request?

      Some operators' custom resources make rather heavy use of the enum -like string fields, for example:
      bypass:
      default: BreakGlassAnnotation
      description: Enables teams to bypass admission control in a monitored manner in the event of an emergency.
      enum:

      • BreakGlassAnnotation
      • Disabled
        type: string
        In the OpenShift console, the fancy form-based editor for custom resources knows about the possible enum values (BreakGlassAnnotation and Disabled in the above example) and displays them as a drop-down, which is very nice. The user does not need to go and look at the documentation to find what an accepted value would be.

      However in the YAML editing view,  the sidebar does not mention either the values nor the default. It just shows the field name and the description.

      3. Why does the customer need this? (List the business requirements here)
       
      Users end up trying invalid values such as true or false in some cases, leading to frustration.
      This has lead to feature requests against the ACS operator to mention the possible values in the description of the field. Since this is likely an issue that is not unique to just the ACS operator, I'm wondering whether we could instead have the description in the sidebar mention the possible values (and the default) since this information is somehow already available to the form-based view.
       
      4. List any affected packages or components.

      OpenShift console

      Any operator that uses enum typed fields.

              rh-ee-jaclee Jackson Lee
              mowsiany@redhat.com Marcin Owsiany
              None
              None
              Yanping Zhang Yanping Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: