apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: peaches.pykorm.infomaniak.com
spec:
  group: pykorm.infomaniak.com
  names:
    kind: Peach
    listKind: PeachList
    plural: peaches
    singular: peach
  scope: Namespaced
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                variety:
                  type: string
                price:
                  type: integer
                colours:
                  type: array
                  items:
                    type: string
                score:
                  type: object
                  properties:
                    exterior:
                      type: integer
                    delicious:
                      type: integer
              required:
                - variety


      additionalPrinterColumns:
        - name: Variety
          type: string
          description: The variety of the peach
          jsonPath: .spec.variety
