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

metadata:
  name: instancemanagers.longhorn.io
  labels:
    longhorn-manager: InstanceManager

spec:
  group: longhorn.io
  names:
    kind: InstanceManager
    listKind: InstanceManagerList
    plural: instancemanagers
    shortNames:
      - lhim
    singular: instancemanager
  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: State
          type: string
          description: The state of the instance manager
          jsonPath: .status.currentState
        - name: Type
          type: string
          description: The type of the instance manager (engine or replica)
          jsonPath: .spec.type
        - name: Node
          type: string
          description: The node that the instance manager is running on
          jsonPath: .spec.nodeID
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp

...
