v1alpha1

package
v1.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=datamover.cnsdp.vmware.com

Index

Constants

View Source
const GroupName = "datamover.cnsdp.vmware.com"

GroupName is the group name for the Data Mover API

Variables

View Source
var (
	// SchemeBuilder collects the scheme builder functions for the Data Mover API
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme applies the SchemeBuilder functions to a specified scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is the GroupVersion for the Data Mover API

Functions

func CustomResources

func CustomResources() map[string]typeInfo

CustomResources returns a map of all custom resources within the Data Mover API group, keyed on Kind.

func Resource

func Resource(resource string) schema.GroupResource

Resource gets a Data Mover GroupResource for a specified resource

Types

type Download

type Download struct {
	// TypeMeta is the metadata for the resource, like kind and apiversion
	meta_v1.TypeMeta `json:",inline"`

	// +optional
	meta_v1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the custom resource spec
	Spec DownloadSpec `json:"spec"`

	// +optional
	Status DownloadStatus `json:"status,omitempty"`
}

Download describe a velero-plugin restore

func (*Download) DeepCopy

func (in *Download) DeepCopy() *Download

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Download.

func (*Download) DeepCopyInto

func (in *Download) DeepCopyInto(out *Download)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Download) DeepCopyObject

func (in *Download) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DownloadList

type DownloadList struct {
	meta_v1.TypeMeta `json:",inline"`

	// +optional
	meta_v1.ListMeta `json:"metadata,omitempty"`

	Items []Download `json:"items"`
}

DownloadList is a list of Download resources

func (*DownloadList) DeepCopy

func (in *DownloadList) DeepCopy() *DownloadList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadList.

func (*DownloadList) DeepCopyInto

func (in *DownloadList) DeepCopyInto(out *DownloadList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DownloadList) DeepCopyObject

func (in *DownloadList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DownloadOperationProgress

type DownloadOperationProgress struct {
	// +optional
	TotalBytes int64 `json:"totalBytes,omitempty"`

	// +optional
	BytesDone int64 `json:"bytesDone,omitempty"`
}

DownloadOperationProgress represents the progress of a Download operation

func (*DownloadOperationProgress) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadOperationProgress.

func (*DownloadOperationProgress) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DownloadPhase

type DownloadPhase string

DownloadPhase represents the lifecycle phase of a Download. +kubebuilder:validation:Enum=New;InProgress;Completed;Retry;Failed

const (
	DownloadPhaseNew        DownloadPhase = "New"
	DownloadPhaseInProgress DownloadPhase = "InProgress"
	DownloadPhaseCompleted  DownloadPhase = "Completed"
	DownLoadPhaseRetry      DownloadPhase = "Retry"
	DownloadPhaseFailed     DownloadPhase = "Failed"
)

type DownloadSpec

type DownloadSpec struct {
	// SnapshotID is the identifier for the snapshot of the volume.
	SnapshotID string `json:"snapshotID,omitempty"`

	// RestoreTimestamp records the time the restore was called.
	// The server's time is used for SnapshotTimestamp
	// +optional
	RestoreTimestamp *meta_v1.Time `json:"restoreTimestamp,omitempty"`

	// ProtectedEntityID is the identifier for the protected entity.
	// This is needed to overwrite an existing volume.
	ProtectedEntityID string `json:"protectedEntityID,omitempty"`

	// BackupRepository provides backup repository info for download.
	// BackupRepositoryName is the name of the BackupRepository.
	BackupRepositoryName string `json:"backupRepositoryName,omitempty"`

	// CloneFromSnapshotReference is the namespace and clonefromsnapshot name for this download request.
	// The format is CloneFromSnapshotNamespace/CloneFromSnapshotName
	// It is used to update the download status in the clonefromsnapshot.
	// +optional
	CloneFromSnapshotReference string `json:"clonefromSnapshotReference,omitempty"`
}

DownloadSpec is the specification for Download resource

func (*DownloadSpec) DeepCopy

func (in *DownloadSpec) DeepCopy() *DownloadSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadSpec.

func (*DownloadSpec) DeepCopyInto

func (in *DownloadSpec) DeepCopyInto(out *DownloadSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DownloadStatus

type DownloadStatus struct {
	// VolumeID is the identifier for the restored volume.
	VolumeID string `json:"volumeID,omitempty"`

	// Phase is the current state of the Download.
	// +optional
	Phase DownloadPhase `json:"phase,omitempty"`

	// Message is a message about the download's status.
	// +optional
	Message string `json:"message,omitempty"`

	// StartTimestamp records the time an download was started.
	// The server's time is used for StartTimestamps
	// +optional
	// +nullable
	StartTimestamp *meta_v1.Time `json:"startTimestamp,omitempty"`

	// CompletionTimestamp records the time an download was completed.
	// Completion time is recorded even on failed downloads.
	// The server's time is used for CompletionTimestamps
	// +optional
	// +nullable
	CompletionTimestamp *meta_v1.Time `json:"completionTimestamp,omitempty"`

	// Progress holds the total number of bytes of the volume and the current
	// number of restore up bytes. This can be used to display progress information
	// about the restore operation.
	// +optional
	Progress DownloadOperationProgress `json:"progress,omitempty"`

	// The DataManager node that has picked up the Download for processing.
	// This will be updated as soon as the Download is picked up for processing.
	// If the DataManager couldn't process Download for some reason it will be picked up by another
	// node.
	ProcessingNode string `json:"processingNode,omitempty"`

	// RetryCount records the number of retry times for re-adding a failed Download CR which failed due to
	// network issue back to queue. Used for user tracking and debugging.
	// +optional
	RetryCount int32 `json:"retryCount,omitempty"`

	// NextRetryTimestamp should be the timestamp that indicate the next retry for failed download CR.
	// Used to filter out the download request which comes in before next retry time.
	// +optional
	// +nullable
	NextRetryTimestamp *meta_v1.Time `json:"nextRetryTimestamp,omitempty"`
}

DownloadStatus is the current status of a Download.

func (*DownloadStatus) DeepCopy

func (in *DownloadStatus) DeepCopy() *DownloadStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadStatus.

func (*DownloadStatus) DeepCopyInto

func (in *DownloadStatus) DeepCopyInto(out *DownloadStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Upload

type Upload struct {
	// TypeMeta is the metadata for the resource, like kind and apiversion
	meta_v1.TypeMeta `json:",inline"`

	// +optional
	meta_v1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the custom resource spec
	Spec UploadSpec `json:"spec"`

	// +optional
	Status UploadStatus `json:"status,omitempty"`
}

Upload describe a velero-plugin backup

func (*Upload) DeepCopy

func (in *Upload) DeepCopy() *Upload

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upload.

func (*Upload) DeepCopyInto

func (in *Upload) DeepCopyInto(out *Upload)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Upload) DeepCopyObject

func (in *Upload) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UploadList

type UploadList struct {
	meta_v1.TypeMeta `json:",inline"`

	// +optional
	meta_v1.ListMeta `json:"metadata,omitempty"`

	Items []Upload `json:"items"`
}

UploadList is a list of Upload resources

func (*UploadList) DeepCopy

func (in *UploadList) DeepCopy() *UploadList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploadList.

func (*UploadList) DeepCopyInto

func (in *UploadList) DeepCopyInto(out *UploadList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UploadList) DeepCopyObject

func (in *UploadList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type UploadOperationProgress

type UploadOperationProgress struct {
	// +optional
	TotalBytes int64 `json:"totalBytes,omitempty"`

	// +optional
	BytesDone int64 `json:"bytesDone,omitempty"`
}

UploadOperationProgress represents the progress of a Upload operation

func (*UploadOperationProgress) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploadOperationProgress.

func (*UploadOperationProgress) DeepCopyInto

func (in *UploadOperationProgress) DeepCopyInto(out *UploadOperationProgress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UploadPhase

type UploadPhase string

UploadPhase represents the lifecycle phase of a Upload. +kubebuilder:validation:Enum=New;InProgress;Completed;UploadError;CleanupFailed;Canceled;Canceling;UploadFailedAfterRetry;

const (
	UploadPhaseNew                    UploadPhase = "New"
	UploadPhaseInProgress             UploadPhase = "InProgress"
	UploadPhaseCompleted              UploadPhase = "Completed"
	UploadPhaseUploadError            UploadPhase = "UploadError"
	UploadPhaseCleanupFailed          UploadPhase = "CleanupFailed"
	UploadPhaseCanceling              UploadPhase = "Canceling"
	UploadPhaseCanceled               UploadPhase = "Canceled"
	UploadPhaseUploadFailedAfterRetry UploadPhase = "UploadFailedAfterRetry"
)

New: not processed yet InProgress: upload is in progress. Completed: upload is completed. UploadError: upload is failed and will be periodically retried. The status will change to "InProgress" at that point. CleanupFailed: delete local snapshot failed after the upload succeed or upload failed after maximum retry, this case will retry the delete local snapshot. Canceling: upload is being cancelled. It would happen if `velero backup delete` is called while the upload of snapshot is in progress. Canceled: upload is cancelled. UploadFailedAfterRetry: terminal state. Upload failed after retry and local snapshot is deleted. User can set the "upload-cr-retry-max" parameter in config map velero-vsphere-plugin-config to specify the maximum count that the upload CR will retry. If user does not specify this in the config map, default retry count is set to 10.

type UploadSpec

type UploadSpec struct {
	// SnapshotID is the identifier for the snapshot of the volume.
	SnapshotID string `json:"snapshotID,omitempty"`

	// BackupTimestamp records the time the backup was called.
	// The server's time is used for SnapshotTimestamp
	BackupTimestamp *meta_v1.Time `json:"backupTimestamp,omitempty"`

	// UploadCancel indicates request to cancel ongoing upload.
	UploadCancel bool `json:"uploadCancel,omitempty"`

	// BackupRepository provides backup repository info for upload. Used for
	// multiple backup repository.
	BackupRepositoryName string `json:"backupRepository,omitempty"`

	// SnapshotReference is the namespace and snapshot name for this upload request.
	// The format is SnapshotNamespace/SnapshotCRName
	// It is used to update the upload status in the snapshot.
	// +optional
	SnapshotReference string `json:"snapshotReference,omitempty"`
}

UploadSpec is the specification for Upload resource

func (*UploadSpec) DeepCopy

func (in *UploadSpec) DeepCopy() *UploadSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploadSpec.

func (*UploadSpec) DeepCopyInto

func (in *UploadSpec) DeepCopyInto(out *UploadSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UploadStatus

type UploadStatus struct {
	// Phase is the current state of the Upload.
	// +optional
	Phase UploadPhase `json:"phase,omitempty"`

	// Message is a message about the upload's status.
	// +optional
	Message string `json:"message,omitempty"`

	// StartTimestamp records the time an upload was started.
	// The server's time is used for StartTimestamps
	// +optional
	// +nullable
	StartTimestamp *meta_v1.Time `json:"startTimestamp,omitempty"`

	// CompletionTimestamp records the time an upload was completed.
	// Completion time is recorded even on failed uploads.
	// The server's time is used for CompletionTimestamps
	// +optional
	// +nullable
	CompletionTimestamp *meta_v1.Time `json:"completionTimestamp,omitempty"`

	// 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.
	// +optional
	Progress UploadOperationProgress `json:"progress,omitempty"`

	// The DataManager node that has picked up the Upload for processing.
	// This will be updated as soon as the Upload is picked up for processing.
	// If the DataManager couldn't process Upload for some reason it will be picked up by another
	// node.
	ProcessingNode string `json:"processingNode,omitempty"`

	// RetryCount records the number of retry times for adding a failed Upload which failed due to
	// network issue back to queue. Used for user tracking and debugging.
	// +optional
	RetryCount int32 `json:"retryCount,omitempty"`

	// NextRetryTimestamp should be the timestamp that indicate the next retry for failed upload CR.
	// Used to filter out the upload request which comes in before next retry time.
	// +optional
	// +nullable
	NextRetryTimestamp *meta_v1.Time `json:"nextRetryTimestamp,omitempty"`

	// CurrentBackOff records the backoff on retry for failed upload. Retry on upload should obey
	// exponential backoff mechanism.
	// +optional
	CurrentBackOff int32 `json:"currentBackOff,omitempty"`
}

UploadStatus is the current status of a Upload.

func (*UploadStatus) DeepCopy

func (in *UploadStatus) DeepCopy() *UploadStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UploadStatus.

func (*UploadStatus) DeepCopyInto

func (in *UploadStatus) DeepCopyInto(out *UploadStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL