Bug 1709090 - Missing openapi CRD definitions for oc explain to work for controllermanager operator
Summary: Missing openapi CRD definitions for oc explain to work for controllermanager ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Adam Kaplan
QA Contact: wewang
URL:
Whiteboard:
Depends On:
Blocks: 1714778
TreeView+ depends on / blocked
 
Reported: 2019-05-13 03:34 UTC by Wenjing Zheng
Modified: 2019-10-16 06:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 1705752
: 1714778 (view as bug list)
Environment:
Last Closed: 2019-10-16 06:28:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift cluster-openshift-controller-manager-operator pull 105 None None None 2019-08-23 20:26:12 UTC
Red Hat Product Errata RHBA-2019:2922 None None None 2019-10-16 06:28:57 UTC

Description Wenjing Zheng 2019-05-13 03:34:51 UTC
+++ 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 ---

Comment 1 Wenjing Zheng 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

Comment 2 wewang 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>

Comment 3 Ben Parees 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 4 Adam Kaplan 2019-06-04 16:52:34 UTC
This was shipped in 4.1.0. Note that the `oc explain` test already works for the openshift controller manager config. Moving to ON_QA

PR: https://github.com/openshift/cluster-openshift-controller-manager-operator/pull/79

@Wenjing looks like the empty Description is expected - only gets filled if you explain an actual field:

$ oc explain openshiftcontrollermanager.spec.logLevel --api-version operator.openshift.io/v1
KIND:     OpenShiftControllerManager
VERSION:  operator.openshift.io/v1

FIELD:    logLevel <string>

DESCRIPTION:
     logLevel is an intent based logging for an overall component. It does not
     give fine grained control, but it is a simple way to manage coarse grained
     logging choices that operators have to interpret for their operands.

Comment 5 Adam Kaplan 2019-06-04 16:54:23 UTC
*** Bug 1714778 has been marked as a duplicate of this bug. ***

Comment 6 wewang 2019-06-05 01:58:51 UTC
verified in version
4.1.0-rc.9
[wewang@Desktop ~]$ oc explain openshiftcontrollermanager.spec.logLevel --api-version operator.openshift.io/v1
KIND:     OpenShiftControllerManager
VERSION:  operator.openshift.io/v1

FIELD:    logLevel <string>

DESCRIPTION:
     logLevel is an intent based logging for an overall component. It does not
     give fine grained control, but it is a simple way to manage coarse grained
     logging choices that operators have to interpret for their operands.

Comment 7 Adam Kaplan 2019-06-12 19:07:06 UTC
Reopening - per @Maciej we should in fact have a fully populated DESCRIPTION field.

Comment 10 wewang 2019-08-26 03:02:59 UTC
verified in 4.2.0-0.nightly-2019-08-24-002347

[wewang@Desktop Downloads]$ oc explain openshiftcontrollermanager
KIND:     OpenShiftControllerManager
VERSION:  operator.openshift.io/v1

DESCRIPTION:
     OpenShiftControllerManager provides information to configure an operator to
     manage openshift-controller-manager.

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>

Comment 11 errata-xmlrpc 2019-10-16 06:28:42 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, 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-2019:2922


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