Bug 1862500 - YAML example uses alm-example but should use initialization resource if exist
Summary: YAML example uses alm-example but should use initialization resource if exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Zac Herman
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-31 14:53 UTC by Zac Herman
Modified: 2020-10-27 16:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:21:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6393 0 None closed Bug 1862500: Use initialization-resource annotation for yaml 2020-09-11 02:24:25 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:22:11 UTC

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


Note You need to log in before you can comment on or make changes to this bug.