rancher / rancher

Complete container management platform
http://rancher.com
Apache License 2.0
22.76k stars 2.91k forks source link

[RFE] Update Schema Definitions to use openapi v3 #45272

Open MbolotSuse opened 2 months ago

MbolotSuse commented 2 months ago

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:

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:

tomleb commented 4 weeks 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.