# we use "x-kubernetes-preserve-unknown-fields: true" to skip the validation of apiserver, you can find the schema of CDI from here:
# https://github.com/kubevirt/containerized-data-importer/blob/dbab72c93e05957fe8eb5d8d861843d79f7998bf/pkg/operator/resources/operator/operator.go#L280-L558.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: cdis.cdi.kubevirt.io
spec:
  group: cdi.kubevirt.io
  names:
    kind: CDI
    listKind: CDIList
    plural: cdis
    shortNames:
      - cdi
      - cdis
    singular: cdi
  versions:
    - additionalPrinterColumns:
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
        - jsonPath: .status.phase
          name: Phase
          type: string
      name: v1alpha1
      served: true
      storage: false
      schema:
        openAPIV3Schema:
          x-kubernetes-preserve-unknown-fields: true
    - additionalPrinterColumns:
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
        - jsonPath: .status.phase
          name: Phase
          type: string
      name: v1beta1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          x-kubernetes-preserve-unknown-fields: true
  scope: Cluster
