apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: localdiskvolumes.hwameistor.io
spec:
  group: hwameistor.io
  names:
    kind: LocalDiskVolume
    listKind: LocalDiskVolumeList
    plural: localdiskvolumes
    shortNames:
    - ldv
    singular: localdiskvolume
  scope: Cluster
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.accessibility.node
      name: Node
      type: string
    - jsonPath: .status.devPath
      name: Disk
      type: string
    - jsonPath: .status.allocatedCapacityBytes
      name: AllocatedCap
      type: integer
    - jsonPath: .spec.diskType
      name: Type
      type: string
    - jsonPath: .status.state
      name: Status
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: LocalDiskVolume is the Schema for the localdiskvolumes API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: LocalDiskVolumeSpec defines the desired state of LocalDiskVolume
            properties:
              accessibility:
                description: Accessibility is the topology requirement of the volume.
                  It describes how to locate and distribute the volume replicas
                properties:
                  node:
                    description: One of the volume replica must be located at this
                      node
                    type: string
                  regions:
                    default:
                    - default
                    description: regions where the volume replicas should be distributed
                      across, it's Optional
                    items:
                      type: string
                    type: array
                  zones:
                    default:
                    - default
                    description: zones where the volume replicas should be distributed
                      across, it's Optional
                    items:
                      type: string
                    type: array
                type: object
              diskType:
                description: DiskType represents the type of drive like SSD, HDD etc.,
                type: string
              persistentVolumeClaimName:
                description: PersistentVolumeClaimName is the reference of the associated
                  PVC
                type: string
              requiredCapacityBytes:
                description: RequiredCapacityBytes
                format: int64
                type: integer
            required:
            - diskType
            type: object
          status:
            description: LocalDiskVolumeStatus defines the observed state of LocalDiskVolume
            properties:
              allocatedCapacityBytes:
                description: AllocatedCapacityBytes is the real allocated capacity
                  in bytes
                format: int64
                type: integer
              devPath:
                description: DevPath is the disk path in the OS
                type: string
              localDiskName:
                description: LocalDiskName is disk name which is used to create this
                  volume
                type: string
              mountPoints:
                description: MountPoints
                items:
                  description: MountPoint
                  properties:
                    fsTye:
                      description: FsTye
                      type: string
                    mountOptions:
                      description: MountOptions
                      items:
                        type: string
                      type: array
                    phase:
                      description: Phase indicates the volume's next or current operation
                      type: string
                    targetPath:
                      description: TargetPath
                      type: string
                    volumeCap:
                      description: VolumeCap
                      properties:
                        accessMode:
                          format: int32
                          type: integer
                        accessType:
                          type: string
                      type: object
                  type: object
                type: array
              state:
                description: State is the phase of volume replica, e.g. Creating,
                  Ready, NotReady, ToBeDeleted, Deleted
                type: string
            required:
            - devPath
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
