Open MbolotSuse opened 2 months ago
Currently, the schema definitions retrieves the fields available for a resource from the openapi/v2
endpoint, as seen here. When creating a CRD, users can specify the openAPISchema for the type in spec.versions[0].schema.openAPIV3Schema
. Since this specification is using the openapi v3 specification, users can specify fields/types here that aren't compatible with the openapi v2. In these cases, the openapi v2 specification will contain only a "type: string" for the type, rather than the required complex field information.
This is currently blocked on https://github.com/rancher/rancher/pull/45483 because steve is using k8s 1.30 / wrangler v3 but that's not yet in rancher/rancher.
Rancher Server Setup
c9be13b09329bbee60a5f6419d500198f83c44d1
Information about the Cluster
User Information
Describe the bug The schema definition for the
rkeConfig
field of theprovisioning.cattle.io.cluster
object has no-subfields and an incorrect type.To Reproduce
rancher/rancher:v2.9-head
$RANCHER/v1/schemaDefinitions/provisioning.cattle.io.cluster
)Result The response contains the following for the "io.cattle.provisioning.v1.Cluster.spec" definition:
Expected Result More fields should be present for the rkeConfig object, including the fields identified by
kubctl explain clusters.provisioning.cattle.io.spec.rkeConfig
:Screenshots N/A
Additional context This represents a regression from the 2.8 behavior for schema fields. 2.8 appears to be able to derive this behavior from the CRDs. Steve should aim to have similar behavior.