apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: localvolumegroups.hwameistor.io
spec:
  group: hwameistor.io
  names:
    kind: LocalVolumeGroup
    listKind: LocalVolumeGroupList
    plural: localvolumegroups
    shortNames:
    - lvg
    singular: localvolumegroup
  scope: Cluster
  versions:
  - additionalPrinterColumns:
    - description: Name of associated pod
      jsonPath: .spec.pods
      name: pod
      type: string
    - description: Namespace of associated pod
      jsonPath: .spec.namespace
      name: namespace
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: age
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: LocalVolumeGroup is the Schema for the localvolumegroups 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: LocalVolumeGroupSpec defines the desired state of LocalVolumeGroup
            properties:
              accessibility:
                description: Accessibility is the topology requirement of the volume.
                  It describes how to locate and distribute the volume replicas
                properties:
                  nodes:
                    description: Nodes is the collection of storage nodes the volume
                      replicas must locate at
                    items:
                      type: string
                    type: array
                  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
              namespace:
                type: string
              pods:
                items:
                  type: string
                type: array
              volumes:
                description: Volumes is the collection of the volumes in the group
                items:
                  properties:
                    localvolume:
                      description: LocalVolumeName is the name of the LocalVolume
                      type: string
                    pvc:
                      description: PersistentVolumeClaimName is the name of the associated
                        PVC
                      type: string
                  type: object
                type: array
            type: object
          status:
            description: LocalVolumeGroupStatus defines the observed state of LocalVolumeGroup
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
