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

Bug 1714778

Summary: [4.1.z] Missing openapi CRD definitions for oc explain to work for controllermanager operator
Product: OpenShift Container Platform Reporter: Adam Kaplan <adam.kaplan>
Component: BuildAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED WONTFIX QA Contact: wewang <wewang>
Severity: high Docs Contact:
Priority: medium    
Version: 4.1.0CC: adam.kaplan, aos-bugs, maszulik, obulatov, wewang, wzheng
Target Milestone: ---Keywords: Reopened
Target Release: 4.1.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1709090 Environment:
Last Closed: 2019-11-04 15:26:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1709090    
Bug Blocks:    

Description Adam Kaplan 2019-05-28 20:01:12 UTC
Per Clayton [1], backporting this to 4.1.z

[1] http://post-office.corp.redhat.com/archives/openshift-sme/2019-May/msg00914.html

+++ This bug was initially created as a clone of Bug #1709090 +++

+++ This bug was initially created as a clone of Bug #1705752 +++

Use this one to track controllermanager operator
if use the full name of controllermanager crd. it will return:
$ oc explain openshiftcontrollermanagers.operator.openshift.io
error: field "operator" does not exist

But if use short name to describe, just no description like other operators:
$ oc explain openshiftcontrollermanagers 
KIND:     OpenShiftControllerManager
VERSION:  operator.openshift.io/v1

DESCRIPTION:
     <empty>

FIELDS:
   apiVersion	<string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

   kind	<string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

   spec	<Object> -required-

   status	<Object>


The following PR https://github.com/openshift/origin/pull/22696 introduced an e2e which is verifying that all the operators provide descriptive information as part of their schema which is then available through oc explain command. 

Your component has a few missing bits, see the commented out lines from the PR.

This should be fixed similarly to https://github.com/openshift/cluster-version-operator/pull/168 and then update origin's e2e test and uncomment the lines from your components.

--- Additional comment from Maciej Szulik on 2019-05-02 21:10:49 UTC ---

Adam, I couldn't figure out a component for cluster-samples-operator but I've created just one issue wrt to imageregistry and sample operator configs. 
I'd like to see both addressed.

--- Additional comment from Ben Parees on 2019-05-02 21:17:03 UTC ---

I created clone https://bugzilla.redhat.com/show_bug.cgi?id=1705753 to cover the samples operator aspect of this.

--- Additional comment from Adam Kaplan on 2019-05-03 16:53:47 UTC ---

@Maciej this is a bit of a riskier proposition, since adding library-go requires bumping k8s.io deps to 1.13. Can we address this as tech debt in 4.2 (with a potential z-stream update for 4.1)?

--- Additional comment from Maciej Szulik on 2019-05-03 20:16:38 UTC ---

Yes 4.1.x is perfect.

--- Additional comment from Paul Weil on 2019-05-10 12:06:30 UTC ---

--- Additional comment from Wenjing Zheng on 2019-05-13 06:06:49 UTC ---

It seels below error is not invalid, because "openshiftcontrollermanagers.operator.openshift.io" is not a resource, right?
$ oc explain openshiftcontrollermanagers.operator.openshift.io
error: field "operator" does not exist

--- Additional comment from wewang on 2019-05-13 06:14:31 UTC ---

It's empty in DESCRIPTION part

$ oc explain openshiftcontrollermanagers --api-version=operator.openshift.io/v1
KIND:     OpenShiftControllerManager
VERSION:  operator.openshift.io/v1

DESCRIPTION:
     <empty>

FIELDS:
   apiVersion	<string>
     APIVersion defines the versioned schema of this representation of an
     object. Servers should convert recognized schemas to the latest internal
     value, and may reject unrecognized values. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#resources

   kind	<string>
     Kind is a string value representing the REST resource this object
     represents. Servers may infer this from the endpoint the client submits
     requests to. Cannot be updated. In CamelCase. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds

   metadata	<Object>
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

   spec	<Object> -required-

   status	<Object>

--- Additional comment from Ben Parees on 2019-05-13 13:57:24 UTC ---

moving to 4.2.0, if you decide to backport it to 4.1.z create a clone.

Comment 1 Adam Kaplan 2019-06-04 16:54:23 UTC
Duplicates #1709090 - fix already shipped in 4.1.0

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

Comment 2 Adam Kaplan 2019-08-23 20:29:10 UTC
Removing duplicate - this BZ now will address the 4.1.z backport.

Comment 3 Adam Kaplan 2019-11-04 15:26:19 UTC
Fix for this requires tooling that is difficult to backport. Given that this is fixed in 4.2, closing as WONTFIX.