Skip to content

Published CRD openapi does not inform kubectl explain or validation #71142

@liggitt

Description

@liggitt

What happened:

#67205 started publishing crd openapi schemas.

What you expected to happen:

kubectl explain and kubectl create would make use of the schema information

How to reproduce it (as minimally and precisely as possible):

  1. create a CRD with a schema: kubectl create -f staging/src/k8s.io/csi-api/pkg/crd/manifests/csinodeinfo.yaml
  2. try to explain the resource: kubectl explain csinodeinfo
  3. try to create the resource with invalid fields: echo '{"kind":"CSINodeInfo","apiVersion":"csi.storage.k8s.io/v1alpha1","metadata":{"name":"foo"},"spec":{"foo":true}}' | kubectl create -f -

Kubectl does not successfully discover the schema info

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

/assign sttts roycaihw

/kind bug

Metadata

Metadata

Assignees

Labels

area/custom-resourceskind/bugCategorizes issue or PR as related to a bug.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions