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

metadata:
  name: engineimages.longhorn.io
  labels:
    longhorn-manager: EngineImage

spec:
  group: longhorn.io
  names:
    kind: EngineImage
    listKind: EngineImageList
    plural: engineimages
    shortNames:
      - lhei
    singular: engineimage
  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: State of the engine image
          jsonPath: .status.state
        - name: Image
          type: string
          description: The Longhorn engine image
          jsonPath: .spec.image
        - name: RefCount
          type: integer
          description: Number of volumes are using the engine image
          jsonPath: .status.refCount
        - name: BuildDate
          type: date
          description: The build date of the engine image
          jsonPath: .status.buildDate
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp

...
