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

Sample tab doesn't show up when ConsoleYAMLSample without snippet applied for ConfigMap

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.18
    • Management Console
    • None
    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None
    • Previously, the Sample tab did not show when creating a new ConfigMap when one or more ConfigMap ConsoleYAMLSamples were present on the cluster. After this update, the Sample tab shows.
    • Bug Fix
    • In Progress

      Description of problem:

       as a follow up issue of https://issues.redhat.com/browse/OCPBUGS-4496 

      Version-Release number of selected component (if applicable):

      4.18.0-0.nightly-2024-09-08-130531    

      How reproducible:

          Always

      Steps to Reproduce:

          1. create a ConfigMap ConsoleYAMLSample without 'snippet: true'
      apiVersion: console.openshift.io/v1
      kind: ConsoleYAMLSample
      metadata:
        name: cm-example-without-snippet
      spec:
        targetResource:
          apiVersion: v1
          kind: ConfigMap
        title: Example ConfigMap
        description: An example ConfigMap YAML sample
        yaml: |
          apiVersion: v1
          kind: ConfigMap
          metadata:
            name: game-demo
          data:
            player_initial_lives: "3"
            ui_properties_file_name: "user-interface.properties"
            game.properties: |
              enemy.types=aliens,monsters
              player.maximum-lives=5    
            user-interface.properties: |
              color.good=purple
              color.bad=yellow
              allow.textmode=true
          2. goes to ConfigMap creation page -> YAML view
          3. create a ConfigMap ConsoleYAMLSample WITH 'snippet: true'
      apiVersion: console.openshift.io/v1
      kind: ConsoleYAMLSample
      metadata:
        name: cm-example-without-snippet
      spec:
        targetResource:
          apiVersion: v1
          kind: ConfigMap
        title: Example ConfigMap
        description: An example ConfigMap YAML sample
        snippet: true
        yaml: |
          apiVersion: v1
          kind: ConfigMap
          metadata:
            name: game-demo
          data:
            player_initial_lives: "3"
            ui_properties_file_name: "user-interface.properties"
            game.properties: |
              enemy.types=aliens,monsters
              player.maximum-lives=5    
            user-interface.properties: |
              color.good=purple
              color.bad=yellow
              allow.textmode=true
          4. goes to ConfigMap creation page -> YAML view

      Actual results:

      2. Sample tab doesn't show up
      4. Snippet tab appears    

      Expected results:

      2. Sample tab should show up when there is no snippet: true 

      Additional info:

          

              rhn-engineering-rhamilto Robb Hamilton
              rhn-support-yapei YaDan Pei
              YaDan Pei YaDan Pei
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: