Bug 1769003
| Summary: | Missing openapi CRD definitions for oc explain to work | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Maciej Szulik <maszulik> | |
| Component: | OLM | Assignee: | Alexander Greene <agreene> | |
| OLM sub component: | OLM | QA Contact: | Jian Zhang <jiazha> | |
| Status: | CLOSED ERRATA | Docs Contact: | ||
| Severity: | urgent | |||
| Priority: | unspecified | CC: | agreene, bandrade, dmesser, jiazha, krizza, tbuskey | |
| Version: | 4.4 | |||
| Target Milestone: | --- | |||
| Target Release: | 4.4.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1780378 (view as bug list) | Environment: | ||
| Last Closed: | 2020-05-04 11:14:43 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: | ||||
| Bug Blocks: | 1780378 | |||
|
Description
Maciej Szulik
2019-11-05 18:11:47 UTC
Thanks for the suggestion. OLM is an independent project as part of the Operator Framework, not Origin. We'll continue to use the Operator SDK to generate the CRDs and should have structural CRDs (as required in 1.16) soon. The best option is the check the CRDs status, but the most important part is to have pruning enabled, you do that setting preserveUnknownFields: false like here: https://github.com/openshift/api/blob/master/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml#L11 this will enforce structural schema to start with. Now you'll need to ensure that the rest of your CRD follows it. It's best to create your CRD and check its status, if there will be problems you should see that reflected in CRD's status. Cluster version is 4.4.0-0.nightly-2020-02-23-191320
mac:~ jianzhang$ oc exec catalog-operator-6f68c78746-lgfwf -- olm --version
OLM version: 0.14.2
git commit: 3d7f04faecb0072e72858b67af34232f854a17cc
Now, the apiVersion of the CRD is `v1`, the pruning enabled as default.
Check the CRD created by OLM:
mac:~ jianzhang$ oc get crd |grep operators.coreos.com
catalogsourceconfigs.operators.coreos.com 2020-02-24T03:28:28Z
catalogsources.operators.coreos.com 2020-02-24T03:28:37Z
clusterserviceversions.operators.coreos.com 2020-02-24T03:28:35Z
installplans.operators.coreos.com 2020-02-24T03:28:36Z
operatorgroups.operators.coreos.com 2020-02-24T03:28:38Z
operatorsources.operators.coreos.com 2020-02-24T03:28:31Z
subscriptions.operators.coreos.com 2020-02-24T03:28:37Z
Check the status of all of them, works well. LGTM, verify it.
mac:~ jianzhang$ for i in catalogsourceconfigs catalogsourceconfigs clusterserviceversions installplans operatorgroups operatorsources subscriptions; do oc get crd $i.operators.coreos.com -o=jsonpath='{.status}'; echo -e "\n"; done;
map[acceptedNames:map[kind:CatalogSourceConfig listKind:CatalogSourceConfigList plural:catalogsourceconfigs shortNames:[csc] singular:catalogsourceconfig] conditions:[map[lastTransitionTime:2020-02-24T03:28:28Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:28Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v2]]
map[acceptedNames:map[kind:CatalogSourceConfig listKind:CatalogSourceConfigList plural:catalogsourceconfigs shortNames:[csc] singular:catalogsourceconfig] conditions:[map[lastTransitionTime:2020-02-24T03:28:28Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:28Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v2]]
map[acceptedNames:map[categories:[olm] kind:ClusterServiceVersion listKind:ClusterServiceVersionList plural:clusterserviceversions shortNames:[csv csvs] singular:clusterserviceversion] conditions:[map[lastTransitionTime:2020-02-24T03:28:35Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:35Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v1alpha1]]
map[acceptedNames:map[categories:[olm] kind:InstallPlan listKind:InstallPlanList plural:installplans shortNames:[ip] singular:installplan] conditions:[map[lastTransitionTime:2020-02-24T03:28:36Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:36Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v1alpha1]]
map[acceptedNames:map[categories:[olm] kind:OperatorGroup listKind:OperatorGroupList plural:operatorgroups shortNames:[og] singular:operatorgroup] conditions:[map[lastTransitionTime:2020-02-24T03:28:38Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:38Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v1]]
map[acceptedNames:map[kind:OperatorSource listKind:OperatorSourceList plural:operatorsources shortNames:[opsrc] singular:operatorsource] conditions:[map[lastTransitionTime:2020-02-24T03:28:31Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:31Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v1]]
map[acceptedNames:map[categories:[olm] kind:Subscription listKind:SubscriptionList plural:subscriptions shortNames:[sub subs] singular:subscription] conditions:[map[lastTransitionTime:2020-02-24T03:28:37Z message:no conflicts found reason:NoConflicts status:True type:NamesAccepted] map[lastTransitionTime:2020-02-24T03:28:37Z message:the initial names have been accepted reason:InitialNamesAccepted status:True type:Established]] storedVersions:[v1alpha1]]
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-2020:0581 |