v1alpha1

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

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

GroupName is the group name for the BackupDriver API

Variables

View Source
var (
	// SchemeBuilder collects the scheme builder functions for the Velero 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 BackupDriver API

Functions

func CustomResources

func CustomResources() map[string]typeInfo

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

func Resource

func Resource(resource string) schema.GroupResource

Resource gets a Velero Plugin GroupResource for a specified resource

Types

type BackupRepository

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

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

	AllowedNamespaces []string `json:"allowedNamespaces"`

	RepositoryDriver      string            `json:"repositoryDriver"`
	RepositoryParameters  map[string]string `json:"repopsitoryParameters"`
	BackupRepositoryClaim string            `json:"backupRepositoryClaim"`

	// +optional
	SvcBackupRepositoryName string `json:"svcBackupRepositoryName"`
}
BackupRepository is a cluster-scoped resource.  It is controlled by the Backup Driver and referenced by
Snapshot, CloneFromSnapshot and Delete.  The BackupRespository resource contains the credential for a backup repository.
The RepositoryDriver defines the driver that will be used to talk to the repository
Only Snapshot,etc. CRs from namespaces that are listed in AllowedNamespaces will be acted on, if the namespace is
not in AllowedNamespaces the operation will fail.

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster

func (*BackupRepository) DeepCopy

func (in *BackupRepository) DeepCopy() *BackupRepository

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

func (*BackupRepository) DeepCopyInto

func (in *BackupRepository) DeepCopyInto(out *BackupRepository)

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

func (*BackupRepository) DeepCopyObject

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

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

type BackupRepositoryClaim

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

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

	// +optional
	AllowedNamespaces []string `json:"allowedNamespaces,omitempty"`

	RepositoryDriver     string            `json:"repositoryDriver"`
	RepositoryParameters map[string]string `json:"repopsitoryParameters"`

	// +optional
	BackupRepository string `json:"backupRepository,omitempty"`
}
BackupRepositoryClaim is used to define/access a BackupRepository.  A new BackupRepository will be created
with the RepositoryDriver, Credential and AllowedNamespaces will either be the namespace that the BackupRepositorySpec
was created in or the AllowedNamespaces specified in the BackupRepositorySpec.  The BackupRepository field will
be updated with the name of the BackupRepository created.

+kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced

func (*BackupRepositoryClaim) DeepCopy

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

func (*BackupRepositoryClaim) DeepCopyInto

func (in *BackupRepositoryClaim) DeepCopyInto(out *BackupRepositoryClaim)

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

func (*BackupRepositoryClaim) DeepCopyObject

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

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

type BackupRepositoryClaimList

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

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

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

BackupRepositoryClaimList is a list of BackupRepositoryClaim resources

func (*BackupRepositoryClaimList) DeepCopy

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

func (*BackupRepositoryClaimList) DeepCopyInto

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

func (*BackupRepositoryClaimList) DeepCopyObject

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

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

type BackupRepositoryList

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

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

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

BackupRepositoryList is a list of BackupRepository resources

func (*BackupRepositoryList) DeepCopy

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

func (*BackupRepositoryList) DeepCopyInto

func (in *BackupRepositoryList) DeepCopyInto(out *BackupRepositoryList)

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

func (*BackupRepositoryList) DeepCopyObject

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

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

type CloneFromSnapshot

type CloneFromSnapshot 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 CloneFromSnapshotSpec `json:"spec"`

	// +optional
	Status CloneStatus `json:"status,omitempty"`
}
CloneFromSnapshot is used to create a new resource (typically a PVC) from a snapshot.  Once the Snapshot's Phase has
moved to Snapshotted it is valid to create a new resource from the snapshot ID

+kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced +kubebuilder:subresource:status

func (*CloneFromSnapshot) DeepCopy

func (in *CloneFromSnapshot) DeepCopy() *CloneFromSnapshot

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

func (*CloneFromSnapshot) DeepCopyInto

func (in *CloneFromSnapshot) DeepCopyInto(out *CloneFromSnapshot)

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

func (*CloneFromSnapshot) DeepCopyObject

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

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

type CloneFromSnapshotList

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

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

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

CloneFromSnapshotList is a list of CloneFromSnapshot resources

func (*CloneFromSnapshotList) DeepCopy

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

func (*CloneFromSnapshotList) DeepCopyInto

func (in *CloneFromSnapshotList) DeepCopyInto(out *CloneFromSnapshotList)

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

func (*CloneFromSnapshotList) DeepCopyObject

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

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

type CloneFromSnapshotSpec

type CloneFromSnapshotSpec struct {
	SnapshotID string `json:"snapshotID"`

	// +optional - if set, this overrides metadata that was stored in the snapshot
	Metadata []byte `json:"metadata,omitempty"`

	// APIGroup of the resource being created
	APIGroup *string `json:"apiGroup"`
	// Kind is the type of resource being created
	Kind string `json:"kind"`

	// The backup repository to retrieve the snapshot from.  The namespace the Snapshot/PVC lives in must have access to the repository
	BackupRepository string `json:"backupRepository"`

	// SnapshotCancel indicates request to cancel ongoing snapshot.  SnapshotCancel can be set at anytime before
	// the snapshot reaches a terminal phase.  If the snapshot has reached a terminal phase
	CloneCancel bool `json:"cloneCancel"`
}

CloneFromSnapshotSpec specifies an object to be cloned from a snapshot ID. The Metadata may be overridden, the format of the metadata is object specific. APIGroup and Kind specify the type of object to create.

func (*CloneFromSnapshotSpec) DeepCopy

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

func (*CloneFromSnapshotSpec) DeepCopyInto

func (in *CloneFromSnapshotSpec) DeepCopyInto(out *CloneFromSnapshotSpec)

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

type ClonePhase

type ClonePhase string
ClonePhase represents the lifecycle phase of a Clone.
New - No work yet, next phase is InProgress
InProgress - snapshot being taken
Completed - new object has been created
Failed - end state, clone failed, no new object was created
Canceling - when the Clone flag is set, if the Clone has not already moved into a terminal state, the
            status will move to Canceling.  The object that was being created will be removed

Canceled - the Clone was canceled, no new object was created

const (
	ClonePhaseNew        ClonePhase = "New"
	ClonePhaseInProgress ClonePhase = "InProgress"
	ClonePhaseCompleted  ClonePhase = "Completed"
	ClonePhaseRetry      ClonePhase = "Retry"
	ClonePhaseFailed     ClonePhase = "Failed"
	ClonePhaseCanceling  ClonePhase = "Canceling"
	ClonePhaseCanceled   ClonePhase = "Canceled"
)

type CloneStatus

type CloneStatus struct {
	// Phase is the current state of the CloneFromSnapshot.
	// +optional
	Phase ClonePhase `json:"phase,omitempty"`

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

	// The handle of the resource that was cloned from the snapshot
	// +optional
	ResourceHandle *core_v1.TypedLocalObjectReference `json:"resourceHandle,omitempty"`

	// CompletionTimestamp records the time an snapshot was completed.
	// The server's time is used for CompletionTimestamps
	// +optional
	// +nullable
	CompletionTimestamp *meta_v1.Time `json:"completionTimestamp,omitempty"`
}

func (*CloneStatus) DeepCopy

func (in *CloneStatus) DeepCopy() *CloneStatus

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

func (*CloneStatus) DeepCopyInto

func (in *CloneStatus) DeepCopyInto(out *CloneStatus)

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

type DeleteSnapshot

type DeleteSnapshot 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 DeleteSnapshotSpec `json:"spec"`

	// Current status of the delete snapshot operation
	// +optional
	Status DeleteSnapshotStatus `json:"status,omitempty"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced +kubebuilder:subresource:status

func (*DeleteSnapshot) DeepCopy

func (in *DeleteSnapshot) DeepCopy() *DeleteSnapshot

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

func (*DeleteSnapshot) DeepCopyInto

func (in *DeleteSnapshot) DeepCopyInto(out *DeleteSnapshot)

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

func (*DeleteSnapshot) DeepCopyObject

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

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

type DeleteSnapshotList

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

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

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

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object DeleteSnapshotList is a list of DeleteSnapshotList resources

func (*DeleteSnapshotList) DeepCopy

func (in *DeleteSnapshotList) DeepCopy() *DeleteSnapshotList

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

func (*DeleteSnapshotList) DeepCopyInto

func (in *DeleteSnapshotList) DeepCopyInto(out *DeleteSnapshotList)

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

func (*DeleteSnapshotList) DeepCopyObject

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

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

type DeleteSnapshotPhase

type DeleteSnapshotPhase string
const (
	DeleteSnapshotPhaseNew        DeleteSnapshotPhase = "New"
	DeleteSnapshotPhaseInProgress DeleteSnapshotPhase = "InProgress"
	DeleteSnapshotPhaseCompleted  DeleteSnapshotPhase = "Completed"
	DeleteSnapshotPhaseFailed     DeleteSnapshotPhase = "Failed"
)

type DeleteSnapshotSpec

type DeleteSnapshotSpec struct {
	SnapshotID string `json:"snapshotID"`

	// The backup repository to retrieve the snapshot from. The namespace the Snapshot/PVC lives in must
	// have access to the repository
	BackupRepository string `json:"backupRepository"`
}

func (*DeleteSnapshotSpec) DeepCopy

func (in *DeleteSnapshotSpec) DeepCopy() *DeleteSnapshotSpec

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

func (*DeleteSnapshotSpec) DeepCopyInto

func (in *DeleteSnapshotSpec) DeepCopyInto(out *DeleteSnapshotSpec)

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

type DeleteSnapshotStatus

type DeleteSnapshotStatus struct {
	// Phase is the current state of the Delete Snapshot.
	Phase DeleteSnapshotPhase `json:"phase,omitempty"`

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

	// CompletionTimestamp records the time an deletesnapshot was completed.
	// The server's time is used for CompletionTimestamps
	// +optional
	// +nullable
	CompletionTimestamp *meta_v1.Time `json:"completionTimestamp,omitempty"`
}

func (*DeleteSnapshotStatus) DeepCopy

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

func (*DeleteSnapshotStatus) DeepCopyInto

func (in *DeleteSnapshotStatus) DeepCopyInto(out *DeleteSnapshotStatus)

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

type Snapshot

type Snapshot 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 SnapshotSpec `json:"spec"`

	// Current status of the snapshot operation
	// +optional
	Status SnapshotStatus `json:"status,omitempty"`
}
Snapshot is used to request that a snapshot is taken.  It is not used to manage the inventory of snapshots and does not
need to exist in order to clone the resource from a snapshot

+kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced +kubebuilder:subresource:status

func (*Snapshot) DeepCopy

func (in *Snapshot) DeepCopy() *Snapshot

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

func (*Snapshot) DeepCopyInto

func (in *Snapshot) DeepCopyInto(out *Snapshot)

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

func (*Snapshot) DeepCopyObject

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

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

type SnapshotList

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

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

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

SnapshotList is a list of Snapshot resources

func (*SnapshotList) DeepCopy

func (in *SnapshotList) DeepCopy() *SnapshotList

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

func (*SnapshotList) DeepCopyInto

func (in *SnapshotList) DeepCopyInto(out *SnapshotList)

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

func (*SnapshotList) DeepCopyObject

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

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

type SnapshotPhase

type SnapshotPhase string

SnapshotPhase represents the lifecycle phase of a Snapshot. New - No work yet, next phase is InProgress InProgress - snapshot being taken Snapshotted - local snapshot complete, next phase is Protecting or SnapshotFailed SnapshotFailed - end state, snapshot was not able to be taken Uploading - snapshot is being moved to durable storage Uploaded - end state, snapshot has been protected UploadFailed - end state, unable to move to durable storage Canceling - when the SanpshotCancel flag is set, if the Snapshot has not already moved into a terminal state, the

status will move to Canceling.  The snapshot ID will be removed from the status status if has been filled in
and the snapshot ID will not longer be valid for a Clone operation

Canceled - the operation was canceled, the snapshot ID is not valid

const (
	SnapshotPhaseNew            SnapshotPhase = "New"
	SnapshotPhaseInProgress     SnapshotPhase = "InProgress"
	SnapshotPhaseSnapshotted    SnapshotPhase = "Snapshotted"
	SnapshotPhaseSnapshotFailed SnapshotPhase = "SnapshotFailed"
	SnapshotPhaseUploading      SnapshotPhase = "Uploading"
	SnapshotPhaseUploaded       SnapshotPhase = "Uploaded"
	SnapshotPhaseUploadFailed   SnapshotPhase = "UploadFailed"
	SnapshotPhaseCanceling      SnapshotPhase = "Canceling"
	SnapshotPhaseCanceled       SnapshotPhase = "Canceled"
	SnapshotPhaseCleanupFailed  SnapshotPhase = "CleanupAfterUploadFailed"
)

type SnapshotProgress

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

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

UploadOperationProgress represents the progress of a Upload operation

func (*SnapshotProgress) DeepCopy

func (in *SnapshotProgress) DeepCopy() *SnapshotProgress

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

func (*SnapshotProgress) DeepCopyInto

func (in *SnapshotProgress) DeepCopyInto(out *SnapshotProgress)

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

type SnapshotSpec

type SnapshotSpec struct {
	// ResourceHandle refers to a Kubernetes resource, currently a PVC but this may be extended in the future
	core_v1.TypedLocalObjectReference `json:"resourceHandle"`

	// The backup repository to snapshot into.  The namespace the Snapshot/PVC lives in must have access to the repository
	BackupRepository string `json:"backupRepository"`

	// SnapshotCancel indicates request to cancel ongoing snapshot.  SnapshotCancel can be set at anytime before
	// the snapshot reaches a terminal phase.  If the snapshot has reached a terminal phase
	SnapshotCancel bool `json:"snapshotCancel,omitempty"`
}

func (*SnapshotSpec) DeepCopy

func (in *SnapshotSpec) DeepCopy() *SnapshotSpec

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

func (*SnapshotSpec) DeepCopyInto

func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec)

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

type SnapshotStatus

type SnapshotStatus struct {
	// Phase is the current state of the Snapshot.
	Phase SnapshotPhase `json:"phase,omitempty"`

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

	// Progress for the upload
	Progress SnapshotProgress `json:"progress,omitempty"`

	// Snapshot ID that has been taken.  This will be filled in when the phase goes to "Snapshotted"
	// +optional
	SnapshotID string `json:"snapshotID,omitempty"`

	// +optional
	// For guest clusters, save the name of the corresponding supervisor cluster snapshot name.
	// This is used to track the upload status from the supervisor cluster.
	SvcSnapshotName string `json:"svcSnapshotName"`

	// Metadata for the snapshotted object
	Metadata []byte `json:"metadata,omitempty"`

	// CompletionTimestamp records the time an snapshot was completed.
	// The server's time is used for CompletionTimestamps
	// +optional
	// +nullable
	CompletionTimestamp *meta_v1.Time `json:"completionTimestamp,omitempty"`
}

func (*SnapshotStatus) DeepCopy

func (in *SnapshotStatus) DeepCopy() *SnapshotStatus

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

func (*SnapshotStatus) DeepCopyInto

func (in *SnapshotStatus) DeepCopyInto(out *SnapshotStatus)

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