Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1862558

Summary: Empty fields are not generating in Yaml of Operator's example
Product: OpenShift Container Platform Reporter: Mukul Panwar <mukul.panwar>
Component: Management ConsoleAssignee: Jakub Hadvig <jhadvig>
Status: CLOSED DUPLICATE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, jokerman, spadgett
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-31 19:31:03 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:
Attachments:
Description Flags
example yaml none

Description Mukul Panwar 2020-07-31 17:33:08 UTC
Created attachment 1703132 [details]
example yaml

Description of problem:
Operator installation is successful and api-example is given with some mandatory fields but value can be blank:

   alm-examples: |-
      [
        {
          "apiVersion": "vfunction.com/v1",
          "kind": "VfunctionServer",
          "metadata": {
            "name": "example-vfunction-server",
            "namespace": "vfunction",
            "labels": {
                "name": "vfunction",
                "app.kubernetes.io/name": "vfunction",
                "app.kubernetes.io/instance": "vfunction-server",
                "app.kubernetes.io/managed-by": "operator"
            }
          },
          "spec": {
            "admin": {
              "email": "admin",
              "name": "Admin",
              "password": "Password1!"
            },
            "host": "http://my.domain.com",
            "org_name": "MyCompany",
            "smtp": {
              "identity": "",
              "password": "",
              "url": "",
              "user": ""
            },
            "tls": {
              "crt": "",
              "key": ""
            }
          }
        }
      ]

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


How reproducible:
smtp fields are required but can be blank if we just generate example as given above it will throw error as shown in attachment. I will work if I will give space between quote: 

           "smtp": {
              "identity": " ",
              "password": " ",
              "url": " ",
              "user": " "
            }

Steps to Reproduce:
1.
2.
3.

Actual results:

apiVersion: vfunction.com/v1
kind: VfunctionServer
metadata:
  namespace: mukul-test
  name: example-vfunction-server
  labels:
    name: vfunction
    app.kubernetes.io/name: vfunction
    app.kubernetes.io/instance: vfunction-server
    app.kubernetes.io/managed-by: operator
spec:
  admin:
    email: admin
    name: Admin
    password: Password1!
  host: 'http://my.domain.com'
  org_name: MyCompany


Expected results:

apiVersion: vfunction.com/v1
kind: VfunctionServer
metadata:
  namespace: mukul-test
  name: example-vfunction-server
  labels:
    name: vfunction
    app.kubernetes.io/name: vfunction
    app.kubernetes.io/instance: vfunction-server
    app.kubernetes.io/managed-by: operator
spec:
  admin:
    email: admin
    name: Admin
    password: Password1!
  host: 'http://my.domain.com'
  org_name: MyCompany
  smtp:
    identity: ''
    password: ''
    url: ''
    user: ''


Additional info:

Comment 1 Samuel Padgett 2020-07-31 19:31:03 UTC
This should be fixed by https://github.com/openshift/console/pull/5988

*** This bug has been marked as a duplicate of bug 1856867 ***