apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: toppings.restaurant.programming-kubernetes.info
spec:
  group: restaurant.programming-kubernetes.info
  names:
    kind: Topping
    listKind: ToppingList
    plural: toppings
    singular: topping
  scope: Cluster
  versions:
  - name: v1alpha1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              cost:
                type: number
                minimum: 0.0
            required:
            - cost
        required:
        - spec
