apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: mayastornodes.openebs.io
spec:
  group: openebs.io
  versions:
    - name: v1alpha1
      served: true
      storage: true
      subresources:
        # Both status and spec parts are updated by the controller.
        status: {}
      schema:
        openAPIV3Schema:
          type: object
          properties:
            apiVersion:
              type: string
            kind:
              type: string
            metadata:
              type: object
            spec:
              description: Specification of the mayastor node.
              type: object
              required:
                - grpcEndpoint
              properties:
                grpcEndpoint:
                  description: Address of gRPC server that mayastor listens on
                  type: string
            status:
              description: State of the node as seen by the control plane
              type: string
      additionalPrinterColumns:
        - name: State
          type: string
          description: State of the storage pool
          jsonPath: .status
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp
  scope: Namespaced
  names:
    kind: MayastorNode
    listKind: MayastorNodeList
    plural: mayastornodes
    singular: mayastornode
    shortNames: ['msn']