Bug 1705752

Summary: Missing openapi CRD definitions for oc explain to work for image-registry operator CRD
Product: OpenShift Container Platform Reporter: Maciej Szulik <maszulik>
Component: Image RegistryAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: adam.kaplan, aos-bugs, eparis, obulatov, wzheng
Target Milestone: ---Flags: adam.kaplan: needinfo-
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: CRD doesn't have OpenAPI schema Consequence: oc explain doesn't work for config.imageregistry resource Fix: generate OpenAPI schema Result: oc explain can provide information about config.imageregistry.operator.openshift.io.
Story Points: ---
Clone Of:
: 1705753 1709090 1714775 (view as bug list) Environment:
Last Closed: 2019-10-16 06:28:30 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:
Bug Depends On: 1712317    
Bug Blocks: 1705753, 1708600, 1714775    

Description Maciej Szulik 2019-05-02 21:06:23 UTC
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.

Comment 1 Maciej Szulik 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.

Comment 2 Ben Parees 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.

Comment 3 Adam Kaplan 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)?

Comment 4 Maciej Szulik 2019-05-03 20:16:38 UTC
Yes 4.1.x is perfect.

Comment 5 Paul Weil 2019-05-10 12:06:30 UTC
*** Bug 1708597 has been marked as a duplicate of this bug. ***

Comment 6 Ben Parees 2019-05-13 13:57:30 UTC
moving to 4.2.0, if you decide to backport it to 4.1.z create a clone.

Comment 8 Oleg Bulatov 2019-06-07 12:27:22 UTC
*** Bug 1659897 has been marked as a duplicate of this bug. ***

Comment 9 Adam Kaplan 2019-06-12 19:13:19 UTC
Needs DESCRIPTION to be fully populated in order to pass. Current output from dev clusters:

```
$ oc explain config --api-version imageregistry.operator.openshift.io/v1
KIND:     Config
VERSION:  imageregistry.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>

   status	<Object>
```

Waiting on input from the CLI team on how to proceed.

Comment 12 Ben Parees 2019-07-30 16:31:23 UTC
Oleg, https://github.com/openshift/cluster-image-registry-operator/pull/319 is closed.  Other PRs associated w/ this BZ are closed or merged.  Should it be moved to modified or back to assigned?  Post doesn't seem correct at this point.

Comment 14 Wenjing Zheng 2019-07-31 09:08:43 UTC
Verified with below version:
Client Version: v4.2.0
Server Version: v1.14.0+1682e38
OpenShift Version: 4.2.0-0.nightly-2019-07-30-000900

$ oc explain config --api-version imageregistry.operator.openshift.io/v1
KIND:     Config
VERSION:  imageregistry.operator.openshift.io/v1

DESCRIPTION:
     Config is the configuration object for a registry instance managed by the
     registry operator

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> -required-
     Standard object's metadata. More info:
     https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

   spec	<Object> -required-

   status	<Object>

Comment 15 errata-xmlrpc 2019-10-16 06:28:30 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