-
Bug
-
Resolution: Done
-
Major
-
2.2.0.GA, 2.3.0.GA, 2.4.0.GA
-
None
-
False
-
False
-
Undefined
-
In OpenShift 4.3 and later, the completion and documentation services provided in the console on custom resource YAML is broken for the `CheCluster` custom resource.
This is quite impacting since those services are very valuable for customers to have a quick and immediate knowledge of the various available Che installation options, as shown in the following screenshot:
Without the services, the user has no idea of the available options, apart from diving deep into the documentation.
This is broken because from this OpenShift version and later, the OpenApi schema of Custom Resource Definitions is expected to be valid according to constraints that are now stricter than in previous OpenShift versions.
Following changes to the latest CRW 2.1.0 CRD file would be required to enable YAML language services again on the CRW custom resource:
- Add the `type: object` field at the root of the OpenApi schema
- Set the `preserveUnknownFields` CRD field to `false`. This should not hurt since we don't use fields that are not specified in the schema, and keep backward compatibility of existing fields when updating the CRD.
The above screenshot show the restored services on a OS 4.3 cluster as soon as these 2 changes are applied to the CRD.
In fact this is a followup of issue https://issues.redhat.com/browse/CRW-823 which appeared to be fixed, but only on CRW 2.1.1, but the fix never came into the 2.20 and higher.
The corresponding upstream GitHub issue has been reopened, and abazko already proposed a PR on upstream:
https://github.com/eclipse/che-operator/pull/509
As soon as this upstream PR is fixed and the downstream repo is synced with the upstream repo again, we should get the changes CRW CRDs.
However in the meantime we could apply the similar changes from the upstream PR (https://github.com/eclipse/che-operator/pull/509/files#diff-298bbfe8e47a72c1dd5b2917767a29132d1cb7f940111a351f129f88351bcbf0R22) in the downstream repo here: https://github.com/eclipse/che-operator/blob/master/deploy/olm-catalog/eclipse-che-preview-openshift/manifests/org_v1_che_crd.yaml#L26