---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  labels:
    component: velero
  annotations:
    controller-gen.kubebuilder.io/version: v0.12.0
  name: datauploads.velero.io
spec:
  group: velero.io
  names:
    kind: DataUpload
    listKind: DataUploadList
    plural: datauploads
    singular: dataupload
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: DataUpload status such as New/InProgress
      jsonPath: .status.phase
      name: Status
      type: string
    - description: Time duration since this DataUpload was started
      jsonPath: .status.startTimestamp
      name: Started
      type: date
    - description: Completed bytes
      format: int64
      jsonPath: .status.progress.bytesDone
      name: Bytes Done
      type: integer
    - description: Total bytes
      format: int64
      jsonPath: .status.progress.totalBytes
      name: Total Bytes
      type: integer
    - description: Name of the Backup Storage Location where this backup should be
        stored
      jsonPath: .spec.backupStorageLocation
      name: Storage Location
      type: string
    - description: Time duration since this DataUpload was created
      jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    - description: Name of the node where the DataUpload is processed
      jsonPath: .status.node
      name: Node
      type: string
    name: v2alpha1
    schema:
      openAPIV3Schema:
        description: DataUpload acts as the protocol between data mover plugins and
          data mover controller for the datamover backup operation
        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: DataUploadSpec is the specification for a DataUpload.
            properties:
              backupStorageLocation:
                description: BackupStorageLocation is the name of the backup storage
                  location where the backup repository is stored.
                type: string
              cancel:
                description: Cancel indicates request to cancel the ongoing DataUpload.
                  It can be set when the DataUpload is in InProgress phase
                type: boolean
              csiSnapshot:
                description: If SnapshotType is CSI, CSISnapshot provides the information
                  of the CSI snapshot.
                nullable: true
                properties:
                  snapshotClass:
                    description: SnapshotClass is the name of the snapshot class that
                      the volume snapshot is created with
                    type: string
                  storageClass:
                    description: StorageClass is the name of the storage class of
                      the PVC that the volume snapshot is created from
                    type: string
                  volumeSnapshot:
                    description: VolumeSnapshot is the name of the volume snapshot
                      to be backed up
                    type: string
                required:
                - storageClass
                - volumeSnapshot
                type: object
              dataMoverConfig:
                additionalProperties:
                  type: string
                description: DataMoverConfig is for data-mover-specific configuration
                  fields.
                nullable: true
                type: object
              datamover:
                description: DataMover specifies the data mover to be used by the
                  backup. If DataMover is "" or "velero", the built-in data mover
                  will be used.
                type: string
              operationTimeout:
                description: OperationTimeout specifies the time used to wait internal
                  operations, before returning error as timeout.
                type: string
              snapshotType:
                description: SnapshotType is the type of the snapshot to be backed
                  up.
                type: string
              sourceNamespace:
                description: SourceNamespace is the original namespace where the volume
                  is backed up from. It is the same namespace for SourcePVC and CSI
                  namespaced objects.
                type: string
              sourcePVC:
                description: SourcePVC is the name of the PVC which the snapshot is
                  taken for.
                type: string
            required:
            - backupStorageLocation
            - operationTimeout
            - snapshotType
            - sourceNamespace
            - sourcePVC
            type: object
          status:
            description: DataUploadStatus is the current status of a DataUpload.
            properties:
              completionTimestamp:
                description: CompletionTimestamp records the time a backup was completed.
                  Completion time is recorded even on failed backups. Completion time
                  is recorded before uploading the backup object. The server's time
                  is used for CompletionTimestamps
                format: date-time
                nullable: true
                type: string
              dataMoverResult:
                additionalProperties:
                  type: string
                description: DataMoverResult stores data-mover-specific information
                  as a result of the DataUpload.
                nullable: true
                type: object
              message:
                description: Message is a message about the DataUpload's status.
                type: string
              node:
                description: Node is name of the node where the DataUpload is processed.
                type: string
              path:
                description: Path is the full path of the snapshot volume being backed
                  up.
                type: string
              phase:
                description: Phase is the current state of the DataUpload.
                enum:
                - New
                - Accepted
                - Prepared
                - InProgress
                - Canceling
                - Canceled
                - Completed
                - Failed
                type: string
              progress:
                description: Progress holds the total number of bytes of the volume
                  and the current number of backed up bytes. This can be used to display
                  progress information about the backup operation.
                properties:
                  bytesDone:
                    format: int64
                    type: integer
                  totalBytes:
                    format: int64
                    type: integer
                type: object
              snapshotID:
                description: SnapshotID is the identifier for the snapshot in the
                  backup repository.
                type: string
              startTimestamp:
                description: StartTimestamp records the time a backup was started.
                  Separate from CreationTimestamp, since that value changes on restores.
                  The server's time is used for StartTimestamps
                format: date-time
                nullable: true
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
