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

metadata:
  name: engines.longhorn.io
  labels:
    longhorn-manager: Engine

spec:
  group: longhorn.io
  names:
    kind: Engine
    listKind: EngineList
    plural: engines
    shortNames:
      - lhe
    singular: engine
  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 current state of the engine
          jsonPath: .status.currentState
        - name: Node
          type: string
          description: The node that the engine is on
          jsonPath: .spec.nodeID
        - name: InstanceManager
          type: string
          description: The instance manager of the engine
          jsonPath: .status.instanceManagerName
        - name: Image
          type: string
          description: The current image of the engine
          jsonPath: .status.currentImage
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp

...
