---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition

metadata:
  name: nodes.longhorn.io
  labels:
    longhorn-manager: Node

spec:
  group: longhorn.io
  names:
    kind: Node
    listKind: NodeList
    plural: nodes
    shortNames:
      - lhn
    singular: node
  scope: Namespaced
  versions:
    - name: v1beta1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              x-kubernetes-preserve-unknown-fields: true
            status:
              x-kubernetes-preserve-unknown-fields: true
      subresources:
        status: {}
      additionalPrinterColumns:
        - name: Ready
          type: string
          description: Indicate whether the node is ready
          jsonPath: .status.conditions['Ready']['status']
        - name: AllowScheduling
          type: boolean
          description: Indicate whether the user disabled/enabled replica scheduling for the node
          jsonPath: .spec.allowScheduling
        - name: Schedulable
          type: string
          description: Indicate whether Longhorn can schedule replicas on the node
          jsonPath: .status.conditions['Schedulable']['status']
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp

...
