Bug 1705746 - Missing openapi CRD definitions for oc explain to work
Summary: Missing openapi CRD definitions for oc explain to work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-02 21:01 UTC by Maciej Szulik
Modified: 2019-10-16 06:28 UTC (History)
5 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:28:33 UTC

Description Maciej Szulik 2019-05-02 21:01:02 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 4 Jeff Peeler 2019-05-08 18:05:44 UTC
This was "part 2" and just merged:

https://github.com/operator-framework/operator-lifecycle-manager/pull/848

Should make 4.1, so retargeting.

Comment 7 Jian Zhang 2019-05-10 06:24:49 UTC
OLM version: io.openshift.build.commit.id=19e7914e33f723c6f77f7aaa0892c7684ce94ed4
Cluster version is 4.1.0-rc.2

mac:beta5 jianzhang$ oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0-201905071832+f055278-dirty", GitCommit:"f055278", GitTreeState:"dirty", BuildDate:"2019-05-07T23:26:15Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+36fc093", GitCommit:"36fc093", GitTreeState:"clean", BuildDate:"2019-05-08T15:27:51Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

mac:beta5 jianzhang$ oc explain sub
KIND:     Subscription
VERSION:  operators.coreos.com/v1alpha1

DESCRIPTION:
     Subscribes service catalog to a source and channel to recieve updates for
     packages.

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>
     Spec for a Subscription

mac:beta5 jianzhang$ oc explain csv
KIND:     ClusterServiceVersion
VERSION:  operators.coreos.com/v1alpha1

DESCRIPTION:
     Represents an Operator that should be running on the cluster, including
     requirements and install strategy.

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>
     Spec for a ClusterServiceVersion

   status	<map[string]>
     Status for a ClusterServiceVersion

mac:beta5 jianzhang$ oc explain ip
KIND:     InstallPlan
VERSION:  operators.coreos.com/v1alpha1

DESCRIPTION:
     Represents a plan to install and resolve dependencies for Cluster Services.

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>
     Spec for an InstallPlan

The above objects look good, but for `catalogsource`, it's lack of the description for the `spec` field. 

mac:beta5 jianzhang$ oc explain catalogsource
KIND:     CatalogSource
VERSION:  operators.coreos.com/v1alpha1

DESCRIPTION:
     A source configured to find packages and updates.

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>
     Spec for a catalog source.

   status	<Object>
     The status of the CatalogSource



mac:beta5 jianzhang$ oc explain operatorgroup
KIND:     OperatorGroup
VERSION:  operators.coreos.com/v1

DESCRIPTION:
     A grouping of namespaces for usage with an 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>

   status	<Object>

Comment 9 Jeff Peeler 2019-07-01 15:28:36 UTC
The missing descriptions for the operator group has been fixed here:
https://github.com/operator-framework/operator-lifecycle-manager/pull/910

Comment 16 Jian Zhang 2019-07-04 03:11:00 UTC
OLM version:
source commit id: 49690b7bc249d729aace013edc18291137304e44

mac:~ jianzhang$ oc rsh catalog-operator-7fc5cdc5f8-9mwwz
sh-4.2$ olm --version
OLM version: 0.10.1
git commit: 49690b7

Cluster version is 4.2.0-0.ci-2019-07-03-100447

`operatorgroup` works well, as below, verify it.
mac:~ jianzhang$ oc explain operatorgroup
KIND:     OperatorGroup
VERSION:  operators.coreos.com/v1

DESCRIPTION:
     A grouping of namespaces for usage with an 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>
     Spec for an OperatorGroup.

   status	<Object>
     The status of the OperatorGroup.

Comment 17 errata-xmlrpc 2019-10-16 06:28:21 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.