First read Stefan's https://kubernetes.io/blog/2019/06/20/crd-structural-schema/ about structural and non-structural schema. This bug's PR is dev-approved and not yet merged, so I'm following issue DPTP-660 to do the pre-merge verifying for QE pre-merge verification goal of issue OCPQE-815 by using the bot to launch one 4.6 cluster with the open PR. after the cluster is ready, did the following verification steps: To create a CRD in apiextensions.k8s.io/v1beta1: - with a structural schema - but without preserveUnknownFields being set at all $ cat crd.yaml apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: testcrs.example.com spec: group: example.com names: kind: TestCR plural: testcrs scope: Namespaced validation: openAPIV3Schema: type: object description: this is description for the crd properties: spec: type: object description: this is description for spec properties: a: type: string description: this is description for field a version: v1 versions: - name: v1 served: true storage: true $ oc create -f crd.yaml Then check oc explain, indeed cannot show description of fields. Then check oc get crd testcrs.example.com -o yaml, 4.6.0-0.ci.test-2020-10-29-093230-ci-ln-hw6j6fb env shows condition NonStructuralSchema as below, this is expected by the PR (4.6.0-0.nightly-2020-10-14-095718 env does not show it). ... spec: ... preserveUnknownFields: true ... conditions: ... - lastTransitionTime: "2020-10-29T10:52:41Z" message: 'spec.preserveUnknownFields: Invalid value: true: must be false' reason: Violations status: "True" type: NonStructuralSchema So the bug is pre-merge verified. After the PR gets merged, the bug will be moved to VERIFIED by the bot automatically or, if not working, by me manually.
This will be solved in 4.7. We won't backport it due to complexity and capacity. Severity is low.