apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: cakes.fvaleri.it
  labels:
    app: cakes
spec:
  scope: Namespaced
  group: fvaleri.it
  names:
    kind: Cake
    plural: cakes
    singular: cake
    shortNames:
      - ck
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                replicas:
                  type: integer
                  minimum: 1
                  description: Number of cakes in the cluster.
                name:
                  type: string
                  description: Name of the cake.
                bakeTimeMinutes:
                  type: integer
                  description: Bake time in minutes.
                ingredients:
                  type: array
                  description: List of ingredients (no duplicates).
                  minItems: 1
                  items:
                    type: string
            status:
              type: object
              properties:
                availableReplicas:
                  type: integer
      subresources:
        status: {}
