apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: zfsvolumes.zfs.csi.cocaine.farm
spec:
  group: zfs.csi.cocaine.farm
  scope: Cluster
  names:
    plural: zfsvolumes
    singular: zfsvolume
    kind: ZFSVolume
    shortNames:
    - zfsv
  # list of versions supported by this CustomResourceDefinition
  versions:
    - name: v1
      # Each version can be enabled/disabled by Served flag.
      served: true
      # One and only one version must be marked as the storage version.
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          required: ["metadata"]
          properties:
            spec:
              type: object
              required: ["id","size","path","pool","compression","dedup"]
              properties:
                id:
                  type: "string"
                size:
                  type: "integer"
                path:
                  type: "string"
                pool:
                  type: "string"
                compression:
                  type: "string"
                dedup:
                  type: "string"
