Bug 1862500

Summary: YAML example uses alm-example but should use initialization resource if exist
Product: OpenShift Container Platform Reporter: Zac Herman <zherman>
Component: Management ConsoleAssignee: Zac Herman <zherman>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.6CC: aos-bugs, jokerman, spadgett, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:21:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zac Herman 2020-07-31 14:53:22 UTC
Description of problem:
The yaml example pafe shows the alm-example for CSV resources which is fine except when an initialization resource is present in the annotations.

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


How reproducible:
Always

Steps to Reproduce:
1. Go to Install Operator Details
2. Create resource with yaml editor
3.

Actual results:
Shows alm-example always

Expected results:
Should show initialization resource if it exists

Additional info:

Comment 2 Zac Herman 2020-08-20 20:29:56 UTC
Moved to upcoming sprint as review/QA has not happened.

Comment 5 Yadan Pei 2020-09-11 02:34:43 UTC
1. Create an operator CSV has operatorframework.io/initialization-resource annotation, and the example YAML is different in alm-examples and operatorframework.io/initialization-resource for the same resource, for example:

    operatorframework.io/initialization-resource: |
      {
        "apiVersion": "core.libopenstorage.org/v1alpha1",
        "kind": "StorageCluster",
        "metadata": {
          "name": "portworx",
          "annotations": {
            "portworx.io/is-openshift": "true",
            "autotest": "yes"
          }
        }
      }
    alm-examples: |-
      [
        {
          "apiVersion": "core.libopenstorage.org/v1alpha1",
          "kind": "StorageCluster",
          "metadata": {
            "name": "portworx",
            "namespace": "test-operator",
            "annotations": {
              "portworx.io/is-openshift": "true"
            }
          }
        },
        {
2. Install the operator and goes to create 'StroageCluster' resource
3. the YAML view shows yaml snippet operatorframework.io/initialization-resource has specified
      {
        "apiVersion": "core.libopenstorage.org/v1alpha1",
        "kind": "StorageCluster",
        "metadata": {
          "name": "portworx",
          "annotations": {
            "portworx.io/is-openshift": "true",
            "autotest": "yes"
          }
        }
      }

Verified on 4.6.0-0.nightly-2020-09-10-195619

Comment 7 errata-xmlrpc 2020-10-27 16:21:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196