apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: minioinstances.miniocontroller.min.io
spec:
  group: miniocontroller.min.io
  scope: Namespaced
  names:
    kind: MinIOInstance
    singular: minioinstance
    plural: minioinstances
  versions:
    - name: v1beta1
      served: true
      storage: true
      schema:
        # openAPIV3Schema is the schema for validating custom objects.
        # Refer https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#specifying-a-structural-schema
        # for more details
        openAPIV3Schema:
          type: object
          x-kubernetes-preserve-unknown-fields: true
          properties:
            spec:
              type: object
              x-kubernetes-preserve-unknown-fields: true
              properties:
                replicas:
                  type: integer
                  minimum: 1
                  maximum: 32
                version:
                  type: string
                mountpath:
                  type: string
                subpath:
                  type: string
      additionalPrinterColumns:
        - name: Replicas
          type: integer
          jsonPath: ".spec.replicas"
