apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: nodemaintenances.nodemaintenance.kubevirt.io
spec:
  group: nodemaintenance.kubevirt.io
  names:
    kind: NodeMaintenance
    listKind: NodeMaintenanceList
    plural: nodemaintenances
    singular: nodemaintenance
  scope: Cluster
  versions:
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: NodeMaintenance is the Schema for the nodemaintenances API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: NodeMaintenanceSpec defines the desired state of NodeMaintenance
            properties:
              nodeName:
                description: Node name to apply maintanance on/off
                type: string
              reason:
                description: Reason for maintanance
                type: string
            required:
            - nodeName
            type: object
          status:
            description: NodeMaintenanceStatus defines the observed state of NodeMaintenance
            properties:
              errorOnLeaseCount:
                description: Consecutive number of errors upon obtaining a lease
                type: integer
              evictionPods:
                description: EvictionPods is the total number of pods up for eviction
                  from the start
                type: integer
              lastError:
                description: LastError represents the latest error if any in the latest
                  reconciliation
                type: string
              pendingPods:
                description: PendingPods is a list of pending pods for eviction
                items:
                  type: string
                type: array
              phase:
                description: Phase is the represtation of the maintenance progress
                  (Running,Succeeded,Failed)
                type: string
              totalpods:
                description: TotalPods is the total number of all pods on the node
                  from the start
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
