apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: localdisknodes.hwameistor.io
spec:
  group: hwameistor.io
  names:
    kind: LocalDiskNode
    listKind: LocalDiskNodeList
    plural: localdisknodes
    shortNames:
    - ldn
    singular: localdisknode
  scope: Cluster
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.totalDisk
      name: TotalDisk
      type: integer
    - jsonPath: .status.allocatableDisk
      name: FreeDisk
      type: integer
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: LocalDiskNode is the Schema for the localdisknodes 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: LocalDiskNodeSpec defines the desired state of LocalDiskNode
            properties:
              attachNode:
                description: AttachNode represent where disk is attached
                type: string
            required:
            - attachNode
            type: object
          status:
            description: LocalDiskNodeStatus defines the observed state of LocalDiskNode
            properties:
              allocatableDisk:
                description: AllocatableDisk
                format: int64
                type: integer
              disks:
                additionalProperties:
                  properties:
                    capacity:
                      description: Capacity
                      format: int64
                      type: integer
                    devPath:
                      description: DevPath
                      type: string
                    diskType:
                      description: DiskType SSD/HDD/NVME...
                      type: string
                    status:
                      description: Status
                      type: string
                  required:
                  - devPath
                  - diskType
                  - status
                  type: object
                description: Disks key is the name of LocalDisk
                type: object
              totalDisk:
                description: TotalDisk
                format: int64
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
