apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: kubecars.kubecar.example.com
spec:
  group: kubecar.example.com
  names:
    kind: KubeCar
    listKind: KubeCarList
    plural: kubecars
    singular: kubecar
  scope: Namespaced
  versions:
    - name: v1alpha1
      schema:
        openAPIV3Schema:
          description: Creates a custom resource which is a KubeCar
          type: object
          x-kubernetes-preserve-unknown-fields: true
          properties:
            spec: 
              description: Spec defines the desired state of KubeCar
              type: object
              required: [size]
              properties:
                size:
                  description: Replica Size of the KubeCar Deployment
                  type: integer
                brand:
                  description: Manufacturer of the KubeCar
                  type: string
                model: 
                  description: Model of the KubeCar
                  type: string
      served: true
      storage: true
      subresources:
        status: {}
