Open MbolotSuse opened 2 months ago
We were unable to do this for the schema definition fix (https://github.com/rancher/rancher/issues/45157) because the kube-openapi library doesn't parse the references properly. So the definition schema ends up not having anything from ObjectMeta, managed fields, etc.
I've opened the following https://github.com/kubernetes/kube-openapi/issues/477 to see if we can get that addressed.
Is your feature request related to a problem? Please describe.
Currently, the steve schema definitions endpoint primarily uses the openapi/v2 enpdoint to retrieve definitions for types. This approach has several limitations:
proto.Maps
rather thanproto.Kinds
, and are missing several common fields such asapiVersion
,kind
, andmetadata
(see #45158).Describe the solution you'd like Rather than using a combination of openapi/v2 and crds, steve should source the definitions from the openapi/v3 endpoint. Note that this should use client-go's built-in
OpenAPIV3()
functionality.Describe alternatives you've considered N/A.
Additional context OpenAPI V3 went GA in 1.27. Prior to this point, it wasn't guaranteed that this endpoint would be available. Because of this, before this feature is implemented, the following needs to be done: