apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: sandwiches.container.training
spec:
  group: container.training
  versions:
    - name: v1alpha1
      served: true
      storage: true
      additionalPrinterColumns:
      # This was updated from .spec.meat to demonstrate breaking
      # versions
      - jsonPath: .spec.protein
        description: The kind of protein in the sandwich
        name: Protein
        type: string
      - jsonPath: .spec.breadType
        name: Bread Type
        type: string
      schema:
        openAPIV3Schema:
          type: object
          required: [ spec ]
          properties:
            spec:
              type: object
              properties:
                # This was updated from .spec.meat to demonstrate breaking
                # versions
                protein:
                  description: The kind of protein
                  type: string
                breadType:
                  description: The kind of bread
                  type: string
                cheese:
                  description: Whether it has cheese
                  type: boolean
              required: [ meat, breadType ]
  scope: Namespaced
  names:
    plural: sandwiches
    singular: sandwich
    kind: Sandwich
    shortNames:
      - nom
