v1alpha1

package
v0.9.3-beta.13 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 12 Imported by: 8

Documentation

Overview

+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=dataprotection.kubeblocks.io

Package v1alpha1 contains API Schema definitions for the dataprotection v1alpha1 API group +kubebuilder:object:generate=true +groupName=dataprotection.kubeblocks.io

Index

Constants

View Source
const (
	// ConditionTypeCSIDriverInstalled is the name of the condition that
	// indicates whether the CSI driver is installed.
	ConditionTypeCSIDriverInstalled = "CSIDriverInstalled"
)
View Source
const (
	DefaultEncryptionAlgorithm = "AES-256-CFB"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "dataprotection.kubeblocks.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = GroupVersion

SchemeGroupVersion is group version used to register these objects.

Functions

func Resource added in v0.6.0

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AccessMethod added in v0.7.0

type AccessMethod string

AccessMethod represents an enumeration type that outlines how the `BackupRepo` can be accessed.

const (
	// AccessMethodMount suggests that the storage is mounted locally
	// which allows for remote files to be accessed akin to local ones.
	AccessMethodMount AccessMethod = "Mount"
	// AccessMethodTool indicates the utilization of a command-line
	// tool for accessing the storage.
	AccessMethodTool AccessMethod = "Tool"
)

type ActionErrorMode added in v0.7.0

type ActionErrorMode string

ActionErrorMode defines how to handle an error from an action. Currently, only the Fail mode is supported, but the Continue mode will be supported in the future.

+kubebuilder:validation:Enum=Continue;Fail

const (
	// ActionErrorModeContinue signifies that an error from an action is acceptable and can be ignored.
	ActionErrorModeContinue ActionErrorMode = "Continue"

	// ActionErrorModeFail signifies that an error from an action is problematic and should be treated as a failure.
	ActionErrorModeFail ActionErrorMode = "Fail"
)

type ActionPhase added in v0.7.0

type ActionPhase string
const (
	// ActionPhaseNew means the action has been created but not yet processed by
	// the BackupController.
	ActionPhaseNew ActionPhase = "New"

	// ActionPhaseRunning means the action is currently executing.
	ActionPhaseRunning ActionPhase = "Running"

	// ActionPhaseCompleted means the action has run successfully without errors.
	ActionPhaseCompleted ActionPhase = "Completed"

	// ActionPhaseFailed means the action ran but encountered an error that
	ActionPhaseFailed ActionPhase = "Failed"
)

type ActionSet added in v0.7.0

type ActionSet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ActionSetSpec   `json:"spec,omitempty"`
	Status ActionSetStatus `json:"status,omitempty"`
}

ActionSet is the Schema for the actionsets API

func (*ActionSet) DeepCopy added in v0.7.0

func (in *ActionSet) DeepCopy() *ActionSet

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

func (*ActionSet) DeepCopyInto added in v0.7.0

func (in *ActionSet) DeepCopyInto(out *ActionSet)

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

func (*ActionSet) DeepCopyObject added in v0.7.0

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

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

func (*ActionSet) HasPostReadyStage added in v0.7.0

func (r *ActionSet) HasPostReadyStage() bool

func (*ActionSet) HasPrepareDataStage added in v0.7.0

func (r *ActionSet) HasPrepareDataStage() bool

type ActionSetList added in v0.7.0

type ActionSetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ActionSet `json:"items"`
}

ActionSetList contains a list of ActionSet

func (*ActionSetList) DeepCopy added in v0.7.0

func (in *ActionSetList) DeepCopy() *ActionSetList

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

func (*ActionSetList) DeepCopyInto added in v0.7.0

func (in *ActionSetList) DeepCopyInto(out *ActionSetList)

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

func (*ActionSetList) DeepCopyObject added in v0.7.0

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

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

type ActionSetSpec added in v0.7.0

type ActionSetSpec struct {
	// Specifies the backup type. Supported values include:
	//
	// - `Full` for a full backup.
	// - `Incremental` back up data that have changed since the last backup (either full or incremental).
	// - `Differential` back up data that has changed since the last full backup.
	// - `Continuous` back up transaction logs continuously, such as MySQL binlog, PostgreSQL WAL, etc.
	//
	// Continuous backup is essential for implementing Point-in-Time Recovery (PITR).
	//
	// +kubebuilder:validation:Enum={Full,Incremental,Differential,Continuous}
	// +kubebuilder:default=Full
	// +kubebuilder:validation:Required
	BackupType BackupType `json:"backupType"`

	// Specifies a list of environment variables to be set in the container.
	//
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`

	// Specifies a list of sources to populate environment variables in the container.
	// The keys within a source must be a C_IDENTIFIER. Any invalid keys will be
	// reported as an event when the container starts. If a key exists in multiple
	// sources, the value from the last source will take precedence. Any values
	// defined by an Env with a duplicate key will take precedence.
	//
	// This field cannot be updated.
	//
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// Specifies the backup action.
	//
	// +optional
	Backup *BackupActionSpec `json:"backup,omitempty"`

	// Specifies the restore action.
	//
	// +optional
	Restore *RestoreActionSpec `json:"restore,omitempty"`
}

ActionSetSpec defines the desired state of ActionSet

func (*ActionSetSpec) DeepCopy added in v0.7.0

func (in *ActionSetSpec) DeepCopy() *ActionSetSpec

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

func (*ActionSetSpec) DeepCopyInto added in v0.7.0

func (in *ActionSetSpec) DeepCopyInto(out *ActionSetSpec)

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

type ActionSetStatus added in v0.7.0

type ActionSetStatus struct {
	// Indicates the phase of the ActionSet. This can be either 'Available' or 'Unavailable'.
	//
	// +optional
	Phase Phase `json:"phase,omitempty"`

	// Provides a human-readable explanation detailing the reason for the current phase of the ActionSet.
	//
	// +optional
	Message string `json:"message,omitempty"`

	// Represents the generation number that has been observed by the controller.
	//
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

ActionSetStatus defines the observed state of ActionSet

func (*ActionSetStatus) DeepCopy added in v0.7.0

func (in *ActionSetStatus) DeepCopy() *ActionSetStatus

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

func (*ActionSetStatus) DeepCopyInto added in v0.7.0

func (in *ActionSetStatus) DeepCopyInto(out *ActionSetStatus)

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

type ActionSpec added in v0.7.0

type ActionSpec struct {
	// Specifies that the action should be executed using the pod's exec API within a container.
	//
	// +optional
	Exec *ExecActionSpec `json:"exec,omitempty"`

	// Specifies that the action should be executed by a Kubernetes Job.
	//
	// +optional
	Job *JobActionSpec `json:"job,omitempty"`
}

ActionSpec defines an action that should be executed. Only one of the fields may be set.

func (*ActionSpec) DeepCopy added in v0.7.0

func (in *ActionSpec) DeepCopy() *ActionSpec

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

func (*ActionSpec) DeepCopyInto added in v0.7.0

func (in *ActionSpec) DeepCopyInto(out *ActionSpec)

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

type ActionStatus added in v0.7.0

type ActionStatus struct {
	// The name of the action.
	//
	// +optional
	Name string `json:"name,omitempty"`

	// Records the target pod name which has been backed up.
	TargetPodName string `json:"targetPodName,omitempty"`

	// The current phase of the action.
	//
	// +optional
	Phase ActionPhase `json:"phase,omitempty"`

	// Records the time an action was started.
	//
	// +optional
	StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"`

	// Records the time an action was completed.
	//
	// +optional
	CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"`

	// An error that caused the action to fail.
	//
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// The type of the action.
	//
	// +optional
	ActionType ActionType `json:"actionType,omitempty"`

	// Available replicas for statefulSet action.
	//
	// +optional
	AvailableReplicas *int32 `json:"availableReplicas,omitempty"`

	// The object reference for the action.
	//
	// +optional
	ObjectRef *corev1.ObjectReference `json:"objectRef,omitempty"`

	// The total size of backed up data size.
	// A string with capacity units in the format of "1Gi", "1Mi", "1Ki".
	// If no capacity unit is specified, it is assumed to be in bytes.
	//
	// +optional
	TotalSize string `json:"totalSize,omitempty"`

	// Records the time range of backed up data, for PITR, this is the time
	// range of recoverable data.
	//
	// +optional
	TimeRange *BackupTimeRange `json:"timeRange,omitempty"`

	// Records the volume snapshot status for the action.
	//
	// +optional
	VolumeSnapshots []VolumeSnapshotStatus `json:"volumeSnapshots,omitempty"`
}

func (*ActionStatus) DeepCopy added in v0.7.0

func (in *ActionStatus) DeepCopy() *ActionStatus

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

func (*ActionStatus) DeepCopyInto added in v0.7.0

func (in *ActionStatus) DeepCopyInto(out *ActionStatus)

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

type ActionType added in v0.7.0

type ActionType string
const (
	ActionTypeJob         ActionType = "Job"
	ActionTypeStatefulSet ActionType = "StatefulSet"
	ActionTypeNone        ActionType = ""
)

type Backup

type Backup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BackupSpec   `json:"spec,omitempty"`
	Status BackupStatus `json:"status,omitempty"`
}

Backup is the Schema for the backups API.

func (*Backup) DeepCopy added in v0.6.0

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto added in v0.6.0

func (in *Backup) DeepCopyInto(out *Backup)

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

func (*Backup) DeepCopyObject added in v0.6.0

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

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

func (*Backup) GetEndTime added in v0.7.0

func (r *Backup) GetEndTime() *metav1.Time

GetEndTime gets the backup end time. Default return status.completionTimestamp, unless status.timeRange.endTime is not nil.

func (*Backup) GetStartTime added in v0.7.0

func (r *Backup) GetStartTime() *metav1.Time

GetStartTime gets the backup start time. Default return status.startTimestamp, unless status.timeRange.startTime is not nil.

func (*Backup) GetTimeZone added in v0.8.1

func (r *Backup) GetTimeZone() string

type BackupActionSpec added in v0.7.0

type BackupActionSpec struct {
	// Represents the action to be performed for backing up data.
	//
	// +kubebuilder:validation:Required
	BackupData *BackupDataActionSpec `json:"backupData,omitempty"`

	// Represents a set of actions that should be executed before the backup process begins.
	//
	// +optional
	PreBackup []ActionSpec `json:"preBackup,omitempty"`

	// Represents a set of actions that should be executed after the backup process has completed.
	//
	// +optional
	PostBackup []ActionSpec `json:"postBackup,omitempty"`

	// Represents a custom deletion action that can be executed before the built-in deletion action.
	// Note: The preDelete action job will ignore the env/envFrom.
	//
	// +optional
	PreDeleteBackup *BaseJobActionSpec `json:"preDelete,omitempty"`
}

func (*BackupActionSpec) DeepCopy added in v0.7.0

func (in *BackupActionSpec) DeepCopy() *BackupActionSpec

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

func (*BackupActionSpec) DeepCopyInto added in v0.7.0

func (in *BackupActionSpec) DeepCopyInto(out *BackupActionSpec)

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

type BackupDataActionSpec added in v0.7.0

type BackupDataActionSpec struct {
	JobActionSpec `json:",inline"`

	// Determines if the backup progress should be synchronized and the interval
	// for synchronization in seconds.
	//
	// +optional
	SyncProgress *SyncProgress `json:"syncProgress,omitempty"`
}

BackupDataActionSpec defines how to back up data.

func (*BackupDataActionSpec) DeepCopy added in v0.7.0

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

func (*BackupDataActionSpec) DeepCopyInto added in v0.7.0

func (in *BackupDataActionSpec) DeepCopyInto(out *BackupDataActionSpec)

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

type BackupDeletionPolicy added in v0.7.0

type BackupDeletionPolicy string

BackupDeletionPolicy describes the policy for end-of-life maintenance of backup content. +enum +kubebuilder:validation:Enum={Delete,Retain}

const (
	BackupDeletionPolicyDelete BackupDeletionPolicy = "Delete"
	BackupDeletionPolicyRetain BackupDeletionPolicy = "Retain"
)

type BackupList

type BackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Backup `json:"items"`
}

BackupList contains a list of Backup.

func (*BackupList) DeepCopy added in v0.6.0

func (in *BackupList) DeepCopy() *BackupList

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

func (*BackupList) DeepCopyInto added in v0.6.0

func (in *BackupList) DeepCopyInto(out *BackupList)

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

func (*BackupList) DeepCopyObject added in v0.6.0

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

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

type BackupMethod added in v0.6.0

type BackupMethod struct {
	// The name of backup method.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	Name string `json:"name"`

	// Specifies whether to take snapshots of persistent volumes. If true,
	// the ActionSetName is not required, the controller will use the CSI volume
	// snapshotter to create the snapshot.
	//
	// +optional
	// +kubebuilder:default=false
	SnapshotVolumes *bool `json:"snapshotVolumes,omitempty"`

	// Refers to the ActionSet object that defines the backup actions.
	// For volume snapshot backup, the actionSet is not required, the controller
	// will use the CSI volume snapshotter to create the snapshot.
	// +optional
	ActionSetName string `json:"actionSetName,omitempty"`

	// Specifies which volumes from the target should be mounted in the backup workload.
	//
	// +optional
	TargetVolumes *TargetVolumeInfo `json:"targetVolumes,omitempty"`

	// Specifies the environment variables for the backup workload.
	//
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Specifies runtime settings for the backup workload container.
	//
	// +optional
	RuntimeSettings *RuntimeSettings `json:"runtimeSettings,omitempty"`

	// Specifies the target information to back up, it will override the target in backup policy.
	//
	// +optional
	Target *BackupTarget `json:"target,omitempty"`

	// Specifies multiple target information for backup operations. This includes details
	// such as the target pod and cluster connection credentials. All specified targets
	// will be backed up collectively.
	Targets []BackupTarget `json:"targets,omitempty"`
}

BackupMethod defines the backup method.

func (*BackupMethod) DeepCopy added in v0.7.0

func (in *BackupMethod) DeepCopy() *BackupMethod

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

func (*BackupMethod) DeepCopyInto added in v0.7.0

func (in *BackupMethod) DeepCopyInto(out *BackupMethod)

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

type BackupPhase

type BackupPhase string

BackupPhase describes the lifecycle phase of a Backup. +enum +kubebuilder:validation:Enum={New,InProgress,Running,Completed,Failed,Deleting}

const (
	// BackupPhaseNew means the backup has been created but not yet processed by
	// the BackupController.
	BackupPhaseNew BackupPhase = "New"

	// BackupPhaseRunning means the backup is currently executing.
	BackupPhaseRunning BackupPhase = "Running"

	// BackupPhaseCompleted means the backup has run successfully without errors.
	BackupPhaseCompleted BackupPhase = "Completed"

	// BackupPhaseFailed means the backup ran but encountered an error that
	// prevented it from completing successfully.
	BackupPhaseFailed BackupPhase = "Failed"

	// BackupPhaseDeleting means the backup and all its associated data are being deleted.
	BackupPhaseDeleting BackupPhase = "Deleting"
)

type BackupPolicy

type BackupPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BackupPolicySpec   `json:"spec,omitempty"`
	Status BackupPolicyStatus `json:"status,omitempty"`
}

BackupPolicy is the Schema for the backuppolicies API.

func (*BackupPolicy) DeepCopy added in v0.6.0

func (in *BackupPolicy) DeepCopy() *BackupPolicy

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

func (*BackupPolicy) DeepCopyInto added in v0.6.0

func (in *BackupPolicy) DeepCopyInto(out *BackupPolicy)

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

func (*BackupPolicy) DeepCopyObject added in v0.6.0

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

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

type BackupPolicyList

type BackupPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BackupPolicy `json:"items"`
}

BackupPolicyList contains a list of BackupPolicy

func (*BackupPolicyList) DeepCopy added in v0.6.0

func (in *BackupPolicyList) DeepCopy() *BackupPolicyList

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

func (*BackupPolicyList) DeepCopyInto added in v0.6.0

func (in *BackupPolicyList) DeepCopyInto(out *BackupPolicyList)

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

func (*BackupPolicyList) DeepCopyObject added in v0.6.0

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

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

type BackupPolicyPhase

type BackupPolicyPhase string

BackupPolicyPhase defines phases for BackupPolicy. +enum +kubebuilder:validation:Enum={Available,Failed}

const (
	BackupPolicyAvailable BackupPolicyPhase = "Available"
	BackupPolicyFailed    BackupPolicyPhase = "Failed"
)

type BackupPolicySpec

type BackupPolicySpec struct {
	// Specifies the name of BackupRepo where the backup data will be stored.
	// If not set, data will be stored in the default backup repository.
	//
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	// +optional
	BackupRepoName *string `json:"backupRepoName,omitempty"`

	// Specifies the directory inside the backup repository to store the backup.
	// This path is relative to the path of the backup repository.
	//
	// +optional
	PathPrefix string `json:"pathPrefix,omitempty"`

	// Specifies the number of retries before marking the backup as failed.
	//
	// +optional
	// +kubebuilder:default=2
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=10
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`

	// Specifies the target information to back up, such as the target pod, the
	// cluster connection credential.
	//
	Target *BackupTarget `json:"target,omitempty"`

	// Specifies multiple target information for backup operations. This includes details
	// such as the target pod and cluster connection credentials. All specified targets
	// will be backed up collectively.
	// optional
	Targets []BackupTarget `json:"targets,omitempty"`

	// Defines the backup methods.
	//
	// +kubebuilder:validation:Required
	BackupMethods []BackupMethod `json:"backupMethods"`

	// Specifies whether backup data should be stored in a Kopia repository.
	//
	// Data within the Kopia repository is both compressed and encrypted. Furthermore,
	// data deduplication is implemented across various backups of the same cluster.
	// This approach significantly reduces the actual storage usage, particularly
	// for clusters with a low update frequency.
	//
	// NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition, otherwise the backup will not be processed.
	//
	// +optional
	// +kubebuilder:default=false
	UseKopia bool `json:"useKopia"`

	// Specifies the parameters for encrypting backup data.
	// Encryption will be disabled if the field is not set.
	//
	// +optional
	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
}

BackupPolicySpec defines the desired state of BackupPolicy +kubebuilder:validation:XValidation:rule="(has(self.target) && !has(self.targets)) || (has(self.targets) && !has(self.target))",message="either spec.target or spec.targets"

func (*BackupPolicySpec) DeepCopy added in v0.6.0

func (in *BackupPolicySpec) DeepCopy() *BackupPolicySpec

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

func (*BackupPolicySpec) DeepCopyInto added in v0.6.0

func (in *BackupPolicySpec) DeepCopyInto(out *BackupPolicySpec)

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

type BackupPolicyStatus

type BackupPolicyStatus struct {
	// Phase - in list of [Available,Unavailable]
	//
	// +optional
	Phase Phase `json:"phase,omitempty"`

	// A human-readable message indicating details about why the BackupPolicy
	// is in this phase.
	//
	// +optional
	Message string `json:"message,omitempty"`

	// ObservedGeneration is the most recent generation observed for this BackupPolicy.
	// It refers to the BackupPolicy's generation, which is updated on mutation by the API Server.
	//
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

BackupPolicyStatus defines the observed state of BackupPolicy

func (*BackupPolicyStatus) DeepCopy added in v0.6.0

func (in *BackupPolicyStatus) DeepCopy() *BackupPolicyStatus

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

func (*BackupPolicyStatus) DeepCopyInto added in v0.6.0

func (in *BackupPolicyStatus) DeepCopyInto(out *BackupPolicyStatus)

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

type BackupRef added in v0.7.0

type BackupRef struct {
	// Specifies the backup name.
	//
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// Specifies the backup namespace.
	//
	// +kubebuilder:validation:Required
	Namespace string `json:"namespace"`

	// Specifies the source target for restoration, identified by its name.
	SourceTargetName string `json:"sourceTargetName,omitempty"`
}

BackupRef describes the backup info.

func (*BackupRef) DeepCopy added in v0.7.0

func (in *BackupRef) DeepCopy() *BackupRef

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

func (*BackupRef) DeepCopyInto added in v0.7.0

func (in *BackupRef) DeepCopyInto(out *BackupRef)

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

type BackupRepo added in v0.6.0

type BackupRepo struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BackupRepoSpec   `json:"spec,omitempty"`
	Status BackupRepoStatus `json:"status,omitempty"`
}

BackupRepo is a repository for storing backup data.

func (*BackupRepo) AccessByMount added in v0.7.0

func (repo *BackupRepo) AccessByMount() bool

func (*BackupRepo) AccessByTool added in v0.7.0

func (repo *BackupRepo) AccessByTool() bool

func (*BackupRepo) DeepCopy added in v0.6.0

func (in *BackupRepo) DeepCopy() *BackupRepo

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

func (*BackupRepo) DeepCopyInto added in v0.6.0

func (in *BackupRepo) DeepCopyInto(out *BackupRepo)

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

func (*BackupRepo) DeepCopyObject added in v0.6.0

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

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

type BackupRepoList added in v0.6.0

type BackupRepoList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BackupRepo `json:"items"`
}

BackupRepoList contains a list of `BackupRepo`.

func (*BackupRepoList) DeepCopy added in v0.6.0

func (in *BackupRepoList) DeepCopy() *BackupRepoList

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

func (*BackupRepoList) DeepCopyInto added in v0.6.0

func (in *BackupRepoList) DeepCopyInto(out *BackupRepoList)

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

func (*BackupRepoList) DeepCopyObject added in v0.6.0

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

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

type BackupRepoPhase added in v0.6.0

type BackupRepoPhase string

BackupRepoPhase denotes different stages for the `BackupRepo`.

+enum +kubebuilder:validation:Enum={PreChecking,Failed,Ready,Deleting}

const (
	// BackupRepoPreChecking indicates the backup repository is being pre-checked.
	BackupRepoPreChecking BackupRepoPhase = "PreChecking"
	// BackupRepoFailed indicates the pre-check has been failed.
	BackupRepoFailed BackupRepoPhase = "Failed"
	// BackupRepoReady indicates the backup repository is ready for use.
	BackupRepoReady BackupRepoPhase = "Ready"
	// BackupRepoDeleting indicates the backup repository is being deleted.
	BackupRepoDeleting BackupRepoPhase = "Deleting"
)

type BackupRepoSpec added in v0.6.0

type BackupRepoSpec struct {
	// Specifies the name of the `StorageProvider` used by this backup repository.
	//
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="StorageProviderRef is immutable"
	// +kubebuilder:validation:Required
	StorageProviderRef string `json:"storageProviderRef"`

	// Specifies the access method of the backup repository.
	//
	// +kubebuilder:validation:Enum={Mount,Tool}
	// +kubebuilder:default=Mount
	// +optional
	AccessMethod AccessMethod `json:"accessMethod,omitempty"`

	// Specifies the capacity of the PVC created by this backup repository.
	//
	// +optional
	VolumeCapacity resource.Quantity `json:"volumeCapacity,omitempty"`

	// Specifies reclaim policy of the PV created by this backup repository.
	//
	// +kubebuilder:validation:Enum={Delete,Retain}
	// +kubebuilder:validation:Required
	PVReclaimPolicy corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy"`

	// Stores the non-secret configuration parameters for the `StorageProvider`.
	//
	// +optional
	Config map[string]string `json:"config,omitempty"`

	// References to the secret that holds the credentials for the `StorageProvider`.
	//
	// +optional
	Credential *corev1.SecretReference `json:"credential,omitempty"`

	// Specifies the prefix of the path for storing backup data.
	//
	// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9-_]+/?)*$`
	// +optional
	PathPrefix string `json:"pathPrefix,omitempty"`
}

BackupRepoSpec defines the desired state of `BackupRepo`.

func (*BackupRepoSpec) DeepCopy added in v0.6.0

func (in *BackupRepoSpec) DeepCopy() *BackupRepoSpec

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

func (*BackupRepoSpec) DeepCopyInto added in v0.6.0

func (in *BackupRepoSpec) DeepCopyInto(out *BackupRepoSpec)

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

type BackupRepoStatus added in v0.6.0

type BackupRepoStatus struct {
	// Represents the current phase of reconciliation for the backup repository.
	// Permissible values are PreChecking, Failed, Ready, Deleting.
	//
	// +kubebuilder:validation:Enum={PreChecking,Failed,Ready,Deleting}
	// +optional
	Phase BackupRepoPhase `json:"phase,omitempty"`

	// Provides a detailed description of the current state of the backup repository.
	//
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Represents the latest generation of the resource that the controller has observed.
	//
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Refers to the generated secret for the `StorageProvider`.
	//
	// +optional
	GeneratedCSIDriverSecret *corev1.SecretReference `json:"generatedCSIDriverSecret,omitempty"`

	// Represents the name of the generated storage class.
	//
	// +optional
	GeneratedStorageClassName string `json:"generatedStorageClassName,omitempty"`

	// Represents the name of the PVC that stores backup data.
	//
	// +optional
	BackupPVCName string `json:"backupPVCName,omitempty"`

	// Represents the name of the secret that contains the configuration for the tool.
	//
	// +optional
	ToolConfigSecretName string `json:"toolConfigSecretName,omitempty"`

	// Indicates if this backup repository is the default one.\
	//
	// +optional
	IsDefault bool `json:"isDefault,omitempty"`
}

BackupRepoStatus defines the observed state of `BackupRepo`.

func (*BackupRepoStatus) DeepCopy added in v0.6.0

func (in *BackupRepoStatus) DeepCopy() *BackupRepoStatus

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

func (*BackupRepoStatus) DeepCopyInto added in v0.6.0

func (in *BackupRepoStatus) DeepCopyInto(out *BackupRepoStatus)

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

type BackupSchedule added in v0.7.0

type BackupSchedule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BackupScheduleSpec   `json:"spec,omitempty"`
	Status BackupScheduleStatus `json:"status,omitempty"`
}

BackupSchedule is the Schema for the backupschedules API.

func (*BackupSchedule) DeepCopy added in v0.7.0

func (in *BackupSchedule) DeepCopy() *BackupSchedule

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

func (*BackupSchedule) DeepCopyInto added in v0.7.0

func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)

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

func (*BackupSchedule) DeepCopyObject added in v0.7.0

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

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

type BackupScheduleList added in v0.7.0

type BackupScheduleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BackupSchedule `json:"items"`
}

BackupScheduleList contains a list of BackupSchedule.

func (*BackupScheduleList) DeepCopy added in v0.7.0

func (in *BackupScheduleList) DeepCopy() *BackupScheduleList

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

func (*BackupScheduleList) DeepCopyInto added in v0.7.0

func (in *BackupScheduleList) DeepCopyInto(out *BackupScheduleList)

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

func (*BackupScheduleList) DeepCopyObject added in v0.7.0

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

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

type BackupSchedulePhase added in v0.7.0

type BackupSchedulePhase string

BackupSchedulePhase defines the phase of BackupSchedule

const (
	// BackupSchedulePhaseAvailable indicates the backup schedule is available.
	BackupSchedulePhaseAvailable BackupSchedulePhase = "Available"

	// BackupSchedulePhaseFailed indicates the backup schedule has failed.
	BackupSchedulePhaseFailed BackupSchedulePhase = "Failed"
)

type BackupScheduleSpec added in v0.7.0

type BackupScheduleSpec struct {
	// Specifies the backupPolicy to be applied for the `schedules`.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	BackupPolicyName string `json:"backupPolicyName"`

	// Defines the deadline in minutes for starting the backup workload if it
	// misses its scheduled time for any reason.
	//
	// +optional
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=1440
	StartingDeadlineMinutes *int64 `json:"startingDeadlineMinutes,omitempty"`

	// Defines the list of backup schedules.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	Schedules []SchedulePolicy `json:"schedules"`
}

BackupScheduleSpec defines the desired state of BackupSchedule.

func (*BackupScheduleSpec) DeepCopy added in v0.7.0

func (in *BackupScheduleSpec) DeepCopy() *BackupScheduleSpec

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

func (*BackupScheduleSpec) DeepCopyInto added in v0.7.0

func (in *BackupScheduleSpec) DeepCopyInto(out *BackupScheduleSpec)

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

type BackupScheduleStatus added in v0.7.0

type BackupScheduleStatus struct {
	// Describes the phase of the BackupSchedule.
	//
	// +optional
	Phase BackupSchedulePhase `json:"phase,omitempty"`

	// Represents the most recent generation observed for this BackupSchedule.
	// It refers to the BackupSchedule's generation, which is updated on mutation
	// by the API Server.
	//
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents an error that caused the backup to fail.
	//
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// Describes the status of each schedule.
	//
	// +optional
	Schedules map[string]ScheduleStatus `json:"schedules,omitempty"`
}

BackupScheduleStatus defines the observed state of BackupSchedule.

func (*BackupScheduleStatus) DeepCopy added in v0.7.0

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

func (*BackupScheduleStatus) DeepCopyInto added in v0.7.0

func (in *BackupScheduleStatus) DeepCopyInto(out *BackupScheduleStatus)

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

type BackupSpec

type BackupSpec struct {
	// Specifies the backup policy to be applied for this backup.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.backupPolicyName"
	BackupPolicyName string `json:"backupPolicyName"`

	// Specifies the backup method name that is defined in the backup policy.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.backupMethod"
	BackupMethod string `json:"backupMethod"`

	// Determines whether the backup contents stored in the backup repository
	// should be deleted when the backup custom resource(CR) is deleted.
	// Supported values are `Retain` and `Delete`.
	//
	// - `Retain` means that the backup content and its physical snapshot on backup repository are kept.
	// - `Delete` means that the backup content and its physical snapshot on backup repository are deleted.
	//
	// TODO: for the retain policy, we should support in the future for only deleting
	//   the backup CR but retaining the backup contents in backup repository.
	//   The current implementation only prevent accidental deletion of backup data.
	//
	// +kubebuilder:validation:Enum=Delete;Retain
	// +kubebuilder:validation:Required
	// +kubebuilder:default=Delete
	DeletionPolicy BackupDeletionPolicy `json:"deletionPolicy,omitempty"`

	// Determines a duration up to which the backup should be kept.
	// Controller will remove all backups that are older than the RetentionPeriod.
	// If not set, the backup will be kept forever.
	// For example, RetentionPeriod of `30d` will keep only the backups of last 30 days.
	// Sample duration format:
	//
	// - years: 	2y
	// - months: 	6mo
	// - days: 		30d
	// - hours: 	12h
	// - minutes: 	30m
	//
	// You can also combine the above durations. For example: 30d12h30m.
	//
	// +optional
	RetentionPeriod RetentionPeriod `json:"retentionPeriod,omitempty"`

	// Determines the parent backup name for incremental or differential backup.
	//
	// +optional
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.parentBackupName"
	ParentBackupName string `json:"parentBackupName,omitempty"`
}

BackupSpec defines the desired state of Backup.

func (*BackupSpec) DeepCopy added in v0.6.0

func (in *BackupSpec) DeepCopy() *BackupSpec

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

func (*BackupSpec) DeepCopyInto added in v0.6.0

func (in *BackupSpec) DeepCopyInto(out *BackupSpec)

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

type BackupStatus

type BackupStatus struct {
	// Specifies the backup format version, which includes major, minor, and patch versions.
	//
	// +optional
	FormatVersion string `json:"formatVersion,omitempty"`

	// Indicates the current state of the backup operation.
	//
	// +optional
	Phase BackupPhase `json:"phase,omitempty"`

	// Indicates when this backup becomes eligible for garbage collection.
	// A 'null' value implies that the backup will not be cleaned up unless manually deleted.
	//
	// +optional
	Expiration *metav1.Time `json:"expiration,omitempty"`

	// Records the time when the backup operation was started.
	// The server's time is used for this timestamp.
	//
	// +optional
	StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"`

	// Records the time when the backup operation was completed.
	// This timestamp is recorded even if the backup operation fails.
	// The server's time is used for this timestamp.
	//
	// +optional
	CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"`

	// Records the duration of the backup operation.
	// When converted to a string, the format is "1h2m0.5s".
	//
	// +optional
	Duration *metav1.Duration `json:"duration,omitempty"`

	// Records the total size of the data backed up.
	// The size is represented as a string with capacity units in the format of "1Gi", "1Mi", "1Ki".
	// If no capacity unit is specified, it is assumed to be in bytes.
	//
	// +optional
	TotalSize string `json:"totalSize,omitempty"`

	// Any error that caused the backup operation to fail.
	//
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// The name of the backup repository.
	//
	// +optional
	BackupRepoName string `json:"backupRepoName,omitempty"`

	// The directory within the backup repository where the backup data is stored.
	// This is an absolute path within the backup repository.
	//
	// +optional
	Path string `json:"path,omitempty"`

	// Records the path of the Kopia repository.
	//
	// +optional
	KopiaRepoPath string `json:"kopiaRepoPath,omitempty"`

	// Records the name of the persistent volume claim used to store the backup data.
	//
	// +optional
	PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"`

	// Records the time range of the data backed up. For Point-in-Time Recovery (PITR),
	// this is the time range of recoverable data.
	//
	// +optional
	TimeRange *BackupTimeRange `json:"timeRange,omitempty"`

	// Records the target information for this backup.
	//
	// +optional
	Target *BackupStatusTarget `json:"target,omitempty"`

	// Records the targets information for this backup.
	//
	// +optional
	Targets []BackupStatusTarget `json:"targets,omitempty"`

	// Records the backup method information for this backup.
	// Refer to BackupMethod for more details.
	//
	// +optional
	BackupMethod *BackupMethod `json:"backupMethod,omitempty"`

	// Records the encryption config for this backup.
	//
	// +optional
	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`

	// Records the actions status for this backup.
	//
	// +optional
	Actions []ActionStatus `json:"actions,omitempty"`

	// Records the volume snapshot status for the action.
	//
	// +optional
	VolumeSnapshots []VolumeSnapshotStatus `json:"volumeSnapshots,omitempty"`

	// Records any additional information for the backup.
	//
	// +optional
	Extras []map[string]string `json:"extras,omitempty"`
}

BackupStatus defines the observed state of Backup.

func (*BackupStatus) DeepCopy added in v0.6.0

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto added in v0.6.0

func (in *BackupStatus) DeepCopyInto(out *BackupStatus)

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

type BackupStatusTarget added in v0.9.0

type BackupStatusTarget struct {
	BackupTarget `json:",inline"`

	// Records the selected pods by the target info during backup.
	SelectedTargetPods []string `json:"selectedTargetPods,omitempty"`
}

func (*BackupStatusTarget) DeepCopy added in v0.9.0

func (in *BackupStatusTarget) DeepCopy() *BackupStatusTarget

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

func (*BackupStatusTarget) DeepCopyInto added in v0.9.0

func (in *BackupStatusTarget) DeepCopyInto(out *BackupStatusTarget)

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

type BackupTarget added in v0.7.0

type BackupTarget struct {
	// Specifies a mandatory and unique identifier for each target when using the "targets" field.
	// The backup data for the current target is stored in a uniquely named subdirectory.
	Name string `json:"name,omitempty"`

	// Used to find the target pod. The volumes of the target pod will be backed up.
	//
	// +kube:validation:Required
	PodSelector *PodSelector `json:"podSelector,omitempty"`

	// Specifies the connection credential to connect to the target database cluster.
	//
	// +optional
	ConnectionCredential *ConnectionCredential `json:"connectionCredential,omitempty"`

	// Specifies the kubernetes resources to back up.
	//
	// +optional
	Resources *KubeResources `json:"resources,omitempty"`

	// Specifies the service account to run the backup workload.
	//
	// +kubebuilder:validation:Required
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

func (*BackupTarget) DeepCopy added in v0.7.0

func (in *BackupTarget) DeepCopy() *BackupTarget

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

func (*BackupTarget) DeepCopyInto added in v0.7.0

func (in *BackupTarget) DeepCopyInto(out *BackupTarget)

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

type BackupTimeRange added in v0.7.0

type BackupTimeRange struct {
	// time zone, supports only zone offset, with a value range of "-12:59 ~ +13:00".
	//
	// +kubebuilder:validation:Pattern:=`^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$`
	// +optional
	TimeZone string `json:"timeZone,omitempty"`

	// Records the start time of the backup, in Coordinated Universal Time (UTC).
	//
	// +optional
	Start *metav1.Time `json:"start,omitempty"`

	// Records the end time of the backup, in Coordinated Universal Time (UTC).
	//
	// +optional
	End *metav1.Time `json:"end,omitempty"`
}

BackupTimeRange records the time range of backed up data, for PITR, this is the time range of recoverable data.

func (*BackupTimeRange) DeepCopy added in v0.7.0

func (in *BackupTimeRange) DeepCopy() *BackupTimeRange

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

func (*BackupTimeRange) DeepCopyInto added in v0.7.0

func (in *BackupTimeRange) DeepCopyInto(out *BackupTimeRange)

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

type BackupType

type BackupType string

BackupType the backup type. +enum +kubebuilder:validation:Enum={Full,Incremental,Differential,Continuous}

const (
	BackupTypeFull         BackupType = "Full"
	BackupTypeIncremental  BackupType = "Incremental"
	BackupTypeDifferential BackupType = "Differential"
	BackupTypeContinuous   BackupType = "Continuous"
)

type BaseJobActionSpec added in v0.8.0

type BaseJobActionSpec struct {
	// Specifies the image of the backup container.
	//
	// +kubebuilder:validation:Required
	Image string `json:"image"`

	// Defines the commands to back up the volume data.
	//
	// +kubebuilder:validation:Required
	Command []string `json:"command"`
}

BaseJobActionSpec is an action that creates a Kubernetes Job to execute a command.

func (*BaseJobActionSpec) DeepCopy added in v0.8.0

func (in *BaseJobActionSpec) DeepCopy() *BaseJobActionSpec

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

func (*BaseJobActionSpec) DeepCopyInto added in v0.8.0

func (in *BaseJobActionSpec) DeepCopyInto(out *BaseJobActionSpec)

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

type ConnectionCredential added in v0.7.0

type ConnectionCredential struct {
	// Refers to the Secret object that contains the connection credential.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	SecretName string `json:"secretName"`

	// Specifies the map key of the user in the connection credential secret.
	//
	// +kubebuilder:default=username
	UsernameKey string `json:"usernameKey,omitempty"`

	// Specifies the map key of the password in the connection credential secret.
	// This password will be saved in the backup annotation for full backup.
	// You can use the environment variable DP_ENCRYPTION_KEY to specify encryption key.
	//
	// +kubebuilder:default=password
	PasswordKey string `json:"passwordKey,omitempty"`

	// Specifies the map key of the host in the connection credential secret.
	//
	// +optional
	HostKey string `json:"hostKey,omitempty"`

	// Specifies the map key of the port in the connection credential secret.
	//
	// +optional
	PortKey string `json:"portKey,omitempty"`
}

ConnectionCredential specifies the connection credential to connect to the target database cluster.

func (*ConnectionCredential) DeepCopy added in v0.7.0

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

func (*ConnectionCredential) DeepCopyInto added in v0.7.0

func (in *ConnectionCredential) DeepCopyInto(out *ConnectionCredential)

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

type DataRestorePolicy added in v0.9.0

type DataRestorePolicy string
const (
	OneToOneRestorePolicy  DataRestorePolicy = "OneToOne"
	OneToManyRestorePolicy DataRestorePolicy = "OneToMany"
)

type EncryptionConfig added in v0.9.0

type EncryptionConfig struct {
	// Specifies the encryption algorithm. Currently supported algorithms are:
	//
	// - AES-128-CFB
	// - AES-192-CFB
	// - AES-256-CFB
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:default=AES-256-CFB
	// +kubebuilder:validation:Enum={AES-128-CFB,AES-192-CFB,AES-256-CFB}
	Algorithm string `json:"algorithm"`

	// Selects the key of a secret in the current namespace, the value of the secret
	// is used as the encryption key.
	//
	// +kubebuilder:validation:Required
	PassPhraseSecretKeyRef *corev1.SecretKeySelector `json:"passPhraseSecretKeyRef"`
}

EncryptionConfig defines the parameters for encrypting backup data.

func (*EncryptionConfig) DeepCopy added in v0.9.0

func (in *EncryptionConfig) DeepCopy() *EncryptionConfig

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

func (*EncryptionConfig) DeepCopyInto added in v0.9.0

func (in *EncryptionConfig) DeepCopyInto(out *EncryptionConfig)

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

type ExecAction added in v0.7.0

type ExecAction struct {
	// Defines the pods that need to be executed for the exec action.
	// Execution will occur on all pods that meet the conditions.
	//
	// +optional
	Target ExecActionTarget `json:"target"`
}

func (*ExecAction) DeepCopy added in v0.7.0

func (in *ExecAction) DeepCopy() *ExecAction

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

func (*ExecAction) DeepCopyInto added in v0.7.0

func (in *ExecAction) DeepCopyInto(out *ExecAction)

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

type ExecActionSpec added in v0.7.0

type ExecActionSpec struct {
	// Specifies the container within the pod where the command should be executed.
	// If not specified, the first container in the pod is used by default.
	//
	// +optional
	Container string `json:"container,omitempty"`

	// Defines the command and arguments to be executed.
	//
	// +kubebuilder:validation:MinItems=1
	Command []string `json:"command"`

	// Indicates how to behave if an error is encountered during the execution of this action.
	//
	// +optional
	// +kubebuilder:default=Fail
	OnError ActionErrorMode `json:"onError,omitempty"`

	// Specifies the maximum duration to wait for the hook to complete before
	// considering the execution a failure.
	//
	// +optional
	Timeout metav1.Duration `json:"timeout,omitempty"`
}

ExecActionSpec is an action that uses the pod exec API to execute a command in a container in a pod.

func (*ExecActionSpec) DeepCopy added in v0.7.0

func (in *ExecActionSpec) DeepCopy() *ExecActionSpec

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

func (*ExecActionSpec) DeepCopyInto added in v0.7.0

func (in *ExecActionSpec) DeepCopyInto(out *ExecActionSpec)

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

type ExecActionTarget added in v0.7.0

type ExecActionTarget struct {
	// Executes kubectl in all selected pods.
	//
	// +kubebuilder:validation:Required
	PodSelector metav1.LabelSelector `json:"podSelector"`
}

func (*ExecActionTarget) DeepCopy added in v0.7.0

func (in *ExecActionTarget) DeepCopy() *ExecActionTarget

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

func (*ExecActionTarget) DeepCopyInto added in v0.7.0

func (in *ExecActionTarget) DeepCopyInto(out *ExecActionTarget)

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

type IncludeResource added in v0.7.0

type IncludeResource struct {
	// +kubebuilder:validation:Required
	GroupResource string `json:"groupResource"`

	// Selects the specified resource for recovery by label.
	//
	// +optional
	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`
}

func (*IncludeResource) DeepCopy added in v0.7.0

func (in *IncludeResource) DeepCopy() *IncludeResource

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

func (*IncludeResource) DeepCopyInto added in v0.7.0

func (in *IncludeResource) DeepCopyInto(out *IncludeResource)

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

type JobAction added in v0.7.0

type JobAction struct {

	// Specifies the restore policy, which is required when the pod selection strategy for the source target is 'All'.
	// This field is ignored if the pod selection strategy is 'Any'.
	// optional
	RequiredPolicyForAllPodSelection *RequiredPolicyForAllPodSelection `json:"requiredPolicyForAllPodSelection,omitempty"`

	// Defines the pods that needs to be executed for the job action.
	//
	// +kubebuilder:validation:Required
	Target JobActionTarget `json:"target"`
}

func (*JobAction) DeepCopy added in v0.7.0

func (in *JobAction) DeepCopy() *JobAction

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

func (*JobAction) DeepCopyInto added in v0.7.0

func (in *JobAction) DeepCopyInto(out *JobAction)

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

type JobActionSpec added in v0.7.0

type JobActionSpec struct {
	BaseJobActionSpec `json:",inline"`

	// Determines whether to run the job workload on the target pod node.
	// If the backup container needs to mount the target pod's volumes, this field
	// should be set to true. Otherwise, the target pod's volumes will be ignored.
	//
	// +optional
	// +kubebuilder:default=false
	RunOnTargetPodNode *bool `json:"runOnTargetPodNode,omitempty"`

	// Indicates how to behave if an error is encountered during the execution of this action.
	//
	// +optional
	// +kubebuilder:default=Fail
	OnError ActionErrorMode `json:"onError,omitempty"`
}

JobActionSpec is an action that creates a Kubernetes Job to execute a command.

func (*JobActionSpec) DeepCopy added in v0.7.0

func (in *JobActionSpec) DeepCopy() *JobActionSpec

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

func (*JobActionSpec) DeepCopyInto added in v0.7.0

func (in *JobActionSpec) DeepCopyInto(out *JobActionSpec)

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

type JobActionTarget added in v0.7.0

type JobActionTarget struct {
	// Selects one of the pods, identified by labels, to build the job spec.
	// This includes mounting required volumes and injecting built-in environment variables of the selected pod.
	//
	// +kubebuilder:validation:Required
	PodSelector PodSelector `json:"podSelector"`

	// Defines which volumes of the selected pod need to be mounted on the restoring pod.
	//
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

func (*JobActionTarget) DeepCopy added in v0.7.0

func (in *JobActionTarget) DeepCopy() *JobActionTarget

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

func (*JobActionTarget) DeepCopyInto added in v0.7.0

func (in *JobActionTarget) DeepCopyInto(out *JobActionTarget)

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

type KubeResources added in v0.7.0

type KubeResources struct {
	// A metav1.LabelSelector to filter the target kubernetes resources that need
	// to be backed up. If not set, will do not back up any kubernetes resources.
	//
	// +kube:validation:Required
	Selector *metav1.LabelSelector `json:"selector,omitempty"`

	// included is a slice of namespaced-scoped resource type names to include in
	// the kubernetes resources.
	// The default value is empty.
	//
	// +optional
	Included []string `json:"included,omitempty"`

	// excluded is a slice of namespaced-scoped resource type names to exclude in
	// the kubernetes resources.
	// The default value is empty.
	//
	// +optional
	Excluded []string `json:"excluded,omitempty"`
}

KubeResources defines the kubernetes resources to back up.

func (*KubeResources) DeepCopy added in v0.7.0

func (in *KubeResources) DeepCopy() *KubeResources

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

func (*KubeResources) DeepCopyInto added in v0.7.0

func (in *KubeResources) DeepCopyInto(out *KubeResources)

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

type ParametersSchema added in v0.9.0

type ParametersSchema struct {
	// Defines the parameters in OpenAPI V3.
	//
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:Type=object
	// +kubebuilder:pruning:PreserveUnknownFields
	// +k8s:conversion-gen=false
	// +optional
	OpenAPIV3Schema *apiextensionsv1.JSONSchemaProps `json:"openAPIV3Schema,omitempty"`

	// Defines which parameters are credential fields, which need to be handled specifically.
	// For instance, these should be stored in a `Secret` instead of a `ConfigMap`.
	//
	// +optional
	CredentialFields []string `json:"credentialFields,omitempty"`
}

ParametersSchema describes the parameters needed for a certain storage.

func (*ParametersSchema) DeepCopy added in v0.9.0

func (in *ParametersSchema) DeepCopy() *ParametersSchema

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

func (*ParametersSchema) DeepCopyInto added in v0.9.0

func (in *ParametersSchema) DeepCopyInto(out *ParametersSchema)

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

type Phase added in v0.7.0

type Phase string

Phase defines the BackupPolicy and ActionSet CR .status.phase +enum +kubebuilder:validation:Enum={Available,Unavailable}

const (
	AvailablePhase   Phase = "Available"
	UnavailablePhase Phase = "Unavailable"
)

func (Phase) IsAvailable added in v0.7.0

func (p Phase) IsAvailable() bool

type PodSelectionStrategy added in v0.7.0

type PodSelectionStrategy string

PodSelectionStrategy specifies the strategy to select when multiple pods are selected for backup target +kubebuilder:validation:Enum={Any,All}

const (
	// PodSelectionStrategyAll selects all pods that match the labelsSelector.
	// TODO: support PodSelectionStrategyAll
	PodSelectionStrategyAll PodSelectionStrategy = "All"

	// PodSelectionStrategyAny selects any one pod that match the labelsSelector.
	PodSelectionStrategyAny PodSelectionStrategy = "Any"
)

type PodSelector added in v0.7.0

type PodSelector struct {
	// labelsSelector is the label selector to filter the target pods.
	*metav1.LabelSelector `json:",inline"`

	// fallbackLabelSelector is used to filter available pods when the labelSelector fails.
	// This only takes effect when the `strategy` field below is set to `Any`.
	//
	// +optional
	FallbackLabelSelector *metav1.LabelSelector `json:"fallbackLabelSelector,omitempty"`

	// Specifies the strategy to select the target pod when multiple pods are selected.
	// Valid values are:
	//
	// - `Any`: select any one pod that match the labelsSelector.
	// - `All`: select all pods that match the labelsSelector. The backup data for the current pod
	// will be stored in a subdirectory named after the pod.
	//
	// +kubebuilder:default=Any
	Strategy PodSelectionStrategy `json:"strategy,omitempty"`
}

func (*PodSelector) DeepCopy added in v0.7.0

func (in *PodSelector) DeepCopy() *PodSelector

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

func (*PodSelector) DeepCopyInto added in v0.7.0

func (in *PodSelector) DeepCopyInto(out *PodSelector)

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

type PrepareDataConfig added in v0.7.0

type PrepareDataConfig struct {

	// Specifies the restore policy, which is required when the pod selection strategy for the source target is 'All'.
	// This field is ignored if the pod selection strategy is 'Any'.
	// optional
	RequiredPolicyForAllPodSelection *RequiredPolicyForAllPodSelection `json:"requiredPolicyForAllPodSelection,omitempty"`

	// Specifies the configuration when using `persistentVolumeClaim.spec.dataSourceRef` method for restoring.
	// Describes the source volume of the backup targetVolumes and the mount path in the restoring container.
	//
	// +kubebuilder:validation:XValidation:rule="self.volumeSource != ” || self.mountPath !=”",message="at least one exists for volumeSource and mountPath."
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.dataSourceRef"
	// +optional
	DataSourceRef *VolumeConfig `json:"dataSourceRef,omitempty"`

	// Defines the persistent Volume claims that need to be restored and mounted together into the restore job.
	// These persistent Volume claims will be created if they do not exist.
	//
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.volumeClaims"
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +optional
	RestoreVolumeClaims []RestoreVolumeClaim `json:"volumeClaims,omitempty"`

	// Defines a template to build persistent Volume claims that need to be restored.
	// These claims will be created in an orderly manner based on the number of replicas or reused if they already exist.
	//
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.volumeClaimsTemplate"
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +optional
	RestoreVolumeClaimsTemplate *RestoreVolumeClaimsTemplate `json:"volumeClaimsTemplate,omitempty"`

	// Defines restore policy for persistent volume claim.
	// Supported policies are as follows:
	//
	// - `Parallel`: parallel recovery of persistent volume claim.
	// - `Serial`: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one.
	//
	// +kubebuilder:default=Parallel
	// +kubebuilder:validation:Required
	VolumeClaimRestorePolicy VolumeClaimRestorePolicy `json:"volumeClaimRestorePolicy"`

	// Specifies the scheduling spec for the restoring pod.
	//
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.schedulingSpec"
	// +optional
	SchedulingSpec SchedulingSpec `json:"schedulingSpec,omitempty"`
}

func (*PrepareDataConfig) DeepCopy added in v0.7.0

func (in *PrepareDataConfig) DeepCopy() *PrepareDataConfig

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

func (*PrepareDataConfig) DeepCopyInto added in v0.7.0

func (in *PrepareDataConfig) DeepCopyInto(out *PrepareDataConfig)

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

func (*PrepareDataConfig) IsSerialPolicy added in v0.7.0

func (p *PrepareDataConfig) IsSerialPolicy() bool

type ReadinessProbe added in v0.7.0

type ReadinessProbe struct {
	// Specifies the number of seconds after the container has started before the probe is initiated.
	//
	// +optional
	// +kubebuilder:validation:Minimum=0
	InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"`

	// Specifies the number of seconds after which the probe times out.
	// The default value is 30 seconds, and the minimum value is 1.
	//
	// +optional
	// +kubebuilder:default=30
	// +kubebuilder:validation:Minimum=1
	TimeoutSeconds int `json:"timeoutSeconds"`

	// Specifies how often (in seconds) to perform the probe.
	// The default value is 5 seconds, and the minimum value is 1.
	//
	// +optional
	// +kubebuilder:default=5
	// +kubebuilder:validation:Minimum=1
	PeriodSeconds int `json:"periodSeconds"`

	// Specifies the action to take.
	//
	// +kubebuilder:validation:Required
	Exec ReadinessProbeExecAction `json:"exec"`
}

func (*ReadinessProbe) DeepCopy added in v0.7.0

func (in *ReadinessProbe) DeepCopy() *ReadinessProbe

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

func (*ReadinessProbe) DeepCopyInto added in v0.7.0

func (in *ReadinessProbe) DeepCopyInto(out *ReadinessProbe)

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

type ReadinessProbeExecAction added in v0.7.0

type ReadinessProbeExecAction struct {
	// Refers to the container image.
	//
	// +kubebuilder:validation:Required
	Image string `json:"image"`

	// Refers to the container command.
	//
	// +kubebuilder:validation:Required
	Command []string `json:"command"`
}

func (*ReadinessProbeExecAction) DeepCopy added in v0.7.0

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

func (*ReadinessProbeExecAction) DeepCopyInto added in v0.7.0

func (in *ReadinessProbeExecAction) DeepCopyInto(out *ReadinessProbeExecAction)

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

type ReadyConfig added in v0.7.0

type ReadyConfig struct {
	// Specifies the configuration for a job action.
	//
	// +optional
	JobAction *JobAction `json:"jobAction,omitempty"`

	// Specifies the configuration for an exec action.
	//
	// +optional
	ExecAction *ExecAction `json:"execAction,omitempty"`

	// Defines the credential template used to create a connection credential.
	//
	// +optional
	ConnectionCredential *ConnectionCredential `json:"connectionCredential,omitempty"`

	// Defines a periodic probe of the service readiness.
	// The controller will perform postReadyHooks of BackupScript.spec.restore
	// after the service readiness when readinessProbe is configured.
	//
	// +optional
	ReadinessProbe *ReadinessProbe `json:"readinessProbe,omitempty"`
}

func (*ReadyConfig) DeepCopy added in v0.7.0

func (in *ReadyConfig) DeepCopy() *ReadyConfig

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

func (*ReadyConfig) DeepCopyInto added in v0.7.0

func (in *ReadyConfig) DeepCopyInto(out *ReadyConfig)

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

type RequiredPolicyForAllPodSelection added in v0.9.0

type RequiredPolicyForAllPodSelection struct {
	// Specifies the data restore policy. Options include:
	// - OneToMany: Enables restoration of all volumes from a single data copy of the original target instance.
	// The 'sourceOfOneToMany' field must be set when using this policy.
	// - OneToOne: Restricts data restoration such that each data piece can only be restored to a single target instance.
	// This is the default policy. When the number of target instances specified for restoration surpasses the count of original backup target instances.
	// +kubebuilder:default=OneToOne
	// +kubebuilder:validation:Required
	DataRestorePolicy DataRestorePolicy `json:"dataRestorePolicy"`

	// Specifies the name of the source target pod. This field is mandatory when the DataRestorePolicy is configured to 'OneToMany'.
	SourceOfOneToMany *SourceOfOneToMany `json:"sourceOfOneToMany,omitempty"`
}

func (*RequiredPolicyForAllPodSelection) DeepCopy added in v0.9.0

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

func (*RequiredPolicyForAllPodSelection) DeepCopyInto added in v0.9.0

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

type Restore added in v0.7.0

type Restore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RestoreSpec   `json:"spec,omitempty"`
	Status RestoreStatus `json:"status,omitempty"`
}

Restore is the Schema for the restores API

func (*Restore) DeepCopy added in v0.7.0

func (in *Restore) DeepCopy() *Restore

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

func (*Restore) DeepCopyInto added in v0.7.0

func (in *Restore) DeepCopyInto(out *Restore)

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

func (*Restore) DeepCopyObject added in v0.7.0

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

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

type RestoreActionSpec added in v0.7.0

type RestoreActionSpec struct {
	// Specifies the action required to prepare data for restoration.
	//
	// +optional
	PrepareData *JobActionSpec `json:"prepareData,omitempty"`

	// Specifies the actions that should be executed after the data has been prepared and is ready for restoration.
	//
	// +optional
	PostReady []ActionSpec `json:"postReady,omitempty"`

	// Determines if a base backup is required during restoration.
	//
	// +optional
	// +kubebuilder:default=true
	BaseBackupRequired *bool `json:"baseBackupRequired,omitempty"`
}

RestoreActionSpec defines how to restore data.

func (*RestoreActionSpec) DeepCopy added in v0.7.0

func (in *RestoreActionSpec) DeepCopy() *RestoreActionSpec

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

func (*RestoreActionSpec) DeepCopyInto added in v0.7.0

func (in *RestoreActionSpec) DeepCopyInto(out *RestoreActionSpec)

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

type RestoreActionStatus added in v0.7.0

type RestoreActionStatus string

RestoreActionStatus the status of restore action. +enum +kubebuilder:validation:Enum={Processing,Completed,Failed}

const (
	RestoreActionProcessing RestoreActionStatus = "Processing"
	RestoreActionCompleted  RestoreActionStatus = "Completed"
	RestoreActionFailed     RestoreActionStatus = "Failed"
)

type RestoreKubeResources added in v0.7.0

type RestoreKubeResources struct {
	// Restores the specified resources.
	//
	// +optional
	IncludeResources []IncludeResource `json:"included,omitempty"`
}

func (*RestoreKubeResources) DeepCopy added in v0.7.0

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

func (*RestoreKubeResources) DeepCopyInto added in v0.7.0

func (in *RestoreKubeResources) DeepCopyInto(out *RestoreKubeResources)

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

type RestoreList added in v0.7.0

type RestoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Restore `json:"items"`
}

RestoreList contains a list of Restore

func (*RestoreList) DeepCopy added in v0.7.0

func (in *RestoreList) DeepCopy() *RestoreList

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

func (*RestoreList) DeepCopyInto added in v0.7.0

func (in *RestoreList) DeepCopyInto(out *RestoreList)

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

func (*RestoreList) DeepCopyObject added in v0.7.0

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

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

type RestorePhase added in v0.7.0

type RestorePhase string

RestorePhase The current phase. Valid values are Running, Completed, Failed, AsDataSource. +enum +kubebuilder:validation:Enum={Running,Completed,Failed,AsDataSource}

const (
	RestorePhaseRunning      RestorePhase = "Running"
	RestorePhaseCompleted    RestorePhase = "Completed"
	RestorePhaseFailed       RestorePhase = "Failed"
	RestorePhaseAsDataSource RestorePhase = "AsDataSource"
)

type RestoreSpec added in v0.7.0

type RestoreSpec struct {
	// Specifies the backup to be restored. The restore behavior is based on the backup type:
	//
	// 1. Full: will be restored the full backup directly.
	// 2. Incremental: will be restored sequentially from the most recent full backup of this incremental backup.
	// 3. Differential: will be restored sequentially from the parent backup of the differential backup.
	// 4. Continuous: will find the most recent full backup at this time point and the continuous backups after it to restore.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.backupName"
	Backup BackupRef `json:"backup"`

	// Specifies the point in time for restoring.
	//
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.restoreTime"
	// +optional
	// +kubebuilder:validation:Pattern=`^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$`
	RestoreTime string `json:"restoreTime,omitempty"`

	// Restores the specified resources of Kubernetes.
	//
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.resources"
	// +optional
	Resources *RestoreKubeResources `json:"resources,omitempty"`

	// Configuration for the action of "prepareData" phase, including the persistent volume claims
	// that need to be restored and scheduling strategy of temporary recovery pod.
	//
	// +optional
	PrepareDataConfig *PrepareDataConfig `json:"prepareDataConfig,omitempty"`

	// Specifies the service account name needed for recovery pod.
	//
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// Configuration for the action of "postReady" phase.
	//
	// +kubebuilder:validation:XValidation:rule="has(self.jobAction) || has(self.execAction)", message="at least one exists for jobAction and execAction."
	// +optional
	ReadyConfig *ReadyConfig `json:"readyConfig,omitempty"`

	// List of environment variables to set in the container for restore. These will be
	// merged with the env of Backup and ActionSet.
	//
	// The priority of merging is as follows: `Restore env > Backup env > ActionSet env`.
	//
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`

	// Specifies the required resources of restore job's container.
	//
	// +optional
	ContainerResources corev1.ResourceRequirements `json:"containerResources,omitempty"`

	// Specifies the number of retries before marking the restore failed.
	//
	// +optional
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=10
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`
}

RestoreSpec defines the desired state of Restore

func (*RestoreSpec) DeepCopy added in v0.7.0

func (in *RestoreSpec) DeepCopy() *RestoreSpec

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

func (*RestoreSpec) DeepCopyInto added in v0.7.0

func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)

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

type RestoreStage added in v0.7.0

type RestoreStage string
const (
	PrepareData RestoreStage = "prepareData"
	PostReady   RestoreStage = "postReady"
)

type RestoreStatus added in v0.7.0

type RestoreStatus struct {
	// Represents the current phase of the restore.
	//
	// +optional
	Phase RestorePhase `json:"phase,omitempty"`

	// Records the date/time when the restore started being processed.
	//
	// +optional
	StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"`

	// Records the date/time when the restore finished being processed.
	//
	// +optional
	CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"`

	// Records the duration of the restore execution.
	// When converted to a string, the form is "1h2m0.5s".
	//
	// +optional
	Duration *metav1.Duration `json:"duration,omitempty"`

	// Records all restore actions performed.
	//
	// +optional
	Actions RestoreStatusActions `json:"actions,omitempty"`

	// Describes the current state of the restore API Resource, like warning.
	//
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

RestoreStatus defines the observed state of Restore

func (*RestoreStatus) DeepCopy added in v0.7.0

func (in *RestoreStatus) DeepCopy() *RestoreStatus

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

func (*RestoreStatus) DeepCopyInto added in v0.7.0

func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)

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

type RestoreStatusAction added in v0.7.0

type RestoreStatusAction struct {
	// Describes the name of the restore action based on the current backup.
	//
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// Describes which backup's restore action belongs to.
	//
	// +kubebuilder:validation:Required
	BackupName string `json:"backupName"`

	// Describes the execution object of the restore action.
	//
	// +kubebuilder:validation:Required
	ObjectKey string `json:"objectKey"`

	// Provides a human-readable message indicating details about the object condition.
	//
	// +optional
	Message string `json:"message,omitempty"`

	// The status of this action.
	//
	// +kubebuilder:validation:Required
	Status RestoreActionStatus `json:"status,omitempty"`

	// The start time of the restore job.
	//
	// +optional
	StartTime metav1.Time `json:"startTime,omitempty"`

	// The completion time of the restore job.
	//
	// +optional
	EndTime metav1.Time `json:"endTime,omitempty"`
}

func (*RestoreStatusAction) DeepCopy added in v0.7.0

func (in *RestoreStatusAction) DeepCopy() *RestoreStatusAction

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

func (*RestoreStatusAction) DeepCopyInto added in v0.7.0

func (in *RestoreStatusAction) DeepCopyInto(out *RestoreStatusAction)

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

type RestoreStatusActions added in v0.7.0

type RestoreStatusActions struct {
	// Records the actions for the prepareData phase.
	//
	// +patchMergeKey=jobName
	// +patchStrategy=merge,retainKeys
	// +optional
	PrepareData []RestoreStatusAction `json:"prepareData,omitempty"`

	// Records the actions for the postReady phase.
	//
	// +patchMergeKey=jobName
	// +patchStrategy=merge,retainKeys
	// +optional
	PostReady []RestoreStatusAction `json:"postReady,omitempty"`
}

func (*RestoreStatusActions) DeepCopy added in v0.7.0

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

func (*RestoreStatusActions) DeepCopyInto added in v0.7.0

func (in *RestoreStatusActions) DeepCopyInto(out *RestoreStatusActions)

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

type RestoreVolumeClaim added in v0.7.0

type RestoreVolumeClaim struct {
	// Specifies the standard metadata for the object.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	//
	// +kubebuilder:validation:Required
	metav1.ObjectMeta `json:"metadata"`

	// Defines the desired characteristics of a persistent volume claim.
	//
	// +kubebuilder:validation:Required
	VolumeClaimSpec corev1.PersistentVolumeClaimSpec `json:"volumeClaimSpec"`

	// Describes the source volume of the backup target volumes and the mount path in the restoring container.
	// At least one must exist for volumeSource and mountPath.
	//
	// +kubebuilder:validation:XValidation:rule="self.volumeSource != ” || self.mountPath !=”",message="at least one exists for volumeSource and mountPath."
	VolumeConfig `json:",inline"`
}

func (*RestoreVolumeClaim) DeepCopy added in v0.7.0

func (in *RestoreVolumeClaim) DeepCopy() *RestoreVolumeClaim

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

func (*RestoreVolumeClaim) DeepCopyInto added in v0.7.0

func (in *RestoreVolumeClaim) DeepCopyInto(out *RestoreVolumeClaim)

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

type RestoreVolumeClaimsTemplate added in v0.7.0

type RestoreVolumeClaimsTemplate struct {
	// Contains a list of volume claims.
	// +kubebuilder:validation:Required
	Templates []RestoreVolumeClaim `json:"templates"`

	// Specifies the replicas of persistent volume claim that need to be created and restored.
	// The format of the created claim name is `$(template-name)-$(index)`.
	//
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Required
	Replicas int32 `json:"replicas"`

	// Specifies the starting index for the created persistent volume claim according to the template.
	// The minimum value is 0.
	//
	// +kubebuilder:validation:Minimum=0
	StartingIndex int32 `json:"startingIndex,omitempty"`
}

func (*RestoreVolumeClaimsTemplate) DeepCopy added in v0.7.0

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

func (*RestoreVolumeClaimsTemplate) DeepCopyInto added in v0.7.0

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

type RetentionPeriod added in v0.7.0

type RetentionPeriod string

RetentionPeriod represents a duration in the format "1y2mo3w4d5h6m", where y=year, mo=month, w=week, d=day, h=hour, m=minute.

func (RetentionPeriod) String added in v0.7.0

func (r RetentionPeriod) String() string

func (RetentionPeriod) ToDuration added in v0.7.0

func (r RetentionPeriod) ToDuration() (time.Duration, error)

ToDuration converts the RetentionPeriod to time.Duration.

type RuntimeSettings added in v0.7.0

type RuntimeSettings struct {
	// Specifies the resource required by container.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	//
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

func (*RuntimeSettings) DeepCopy added in v0.7.0

func (in *RuntimeSettings) DeepCopy() *RuntimeSettings

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

func (*RuntimeSettings) DeepCopyInto added in v0.7.0

func (in *RuntimeSettings) DeepCopyInto(out *RuntimeSettings)

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

type SchedulePhase added in v0.7.0

type SchedulePhase string

SchedulePhase represents the phase of a schedule.

const (
	ScheduleRunning SchedulePhase = "Running"
	ScheduleFailed  SchedulePhase = "Failed"
)

type SchedulePolicy

type SchedulePolicy struct {
	// Specifies whether the backup schedule is enabled or not.
	//
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// Specifies the backup method name that is defined in backupPolicy.
	//
	// +kubebuilder:validation:Required
	BackupMethod string `json:"backupMethod"`

	// Specifies the cron expression for the schedule. The timezone is in UTC.
	// see https://en.wikipedia.org/wiki/Cron.
	//
	// +kubebuilder:validation:Required
	CronExpression string `json:"cronExpression"`

	// Determines the duration for which the backup should be kept.
	// KubeBlocks will remove all backups that are older than the RetentionPeriod.
	// For example, RetentionPeriod of `30d` will keep only the backups of last 30 days.
	// Sample duration format:
	//
	// - years: 	2y
	// - months: 	6mo
	// - days: 		30d
	// - hours: 	12h
	// - minutes: 	30m
	//
	// You can also combine the above durations. For example: 30d12h30m
	//
	// +optional
	// +kubebuilder:default="7d"
	RetentionPeriod RetentionPeriod `json:"retentionPeriod,omitempty"`
}

func (*SchedulePolicy) DeepCopy added in v0.6.0

func (in *SchedulePolicy) DeepCopy() *SchedulePolicy

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

func (*SchedulePolicy) DeepCopyInto added in v0.6.0

func (in *SchedulePolicy) DeepCopyInto(out *SchedulePolicy)

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

type ScheduleStatus added in v0.7.0

type ScheduleStatus struct {
	// Describes the phase of the schedule.
	//
	// +optional
	Phase SchedulePhase `json:"phase,omitempty"`

	// Represents an error that caused the backup to fail.
	//
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// Records the last time the backup was scheduled.
	//
	// +optional
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`

	// Records the last time the backup was successfully completed.
	//
	// +optional
	LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"`
}

ScheduleStatus represents the status of each schedule.

func (*ScheduleStatus) DeepCopy added in v0.7.0

func (in *ScheduleStatus) DeepCopy() *ScheduleStatus

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

func (*ScheduleStatus) DeepCopyInto added in v0.7.0

func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)

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

type SchedulingSpec added in v0.7.0

type SchedulingSpec struct {
	// Specifies the tolerations for the restoring pod.
	//
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Defines a selector which must be true for the pod to fit on a node.
	// The selector must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	//
	// +optional
	// +mapType=atomic
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Specifies a request to schedule this pod onto a specific node. If it is non-empty,
	// the scheduler simply schedules this pod onto that node, assuming that it fits resource
	// requirements.
	//
	// +optional
	NodeName string `json:"nodeName,omitempty"`

	// Contains a group of affinity scheduling rules.
	// Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	//
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Describes how a group of pods ought to spread across topology
	// domains. The scheduler will schedule pods in a way which abides by the constraints.
	// Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
	//
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// Specifies the scheduler to dispatch the pod.
	// If not specified, the pod will be dispatched by the default scheduler.
	//
	// +optional
	SchedulerName string `json:"schedulerName,omitempty"`
}

func (*SchedulingSpec) DeepCopy added in v0.7.0

func (in *SchedulingSpec) DeepCopy() *SchedulingSpec

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

func (*SchedulingSpec) DeepCopyInto added in v0.7.0

func (in *SchedulingSpec) DeepCopyInto(out *SchedulingSpec)

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

type SourceOfOneToMany added in v0.9.0

type SourceOfOneToMany struct {
	// Specifies the name of the source target pod.
	// +kubebuilder:validation:Required
	TargetPodName string `json:"targetPodName"`
}

func (*SourceOfOneToMany) DeepCopy added in v0.9.0

func (in *SourceOfOneToMany) DeepCopy() *SourceOfOneToMany

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

func (*SourceOfOneToMany) DeepCopyInto added in v0.9.0

func (in *SourceOfOneToMany) DeepCopyInto(out *SourceOfOneToMany)

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

type StorageProvider added in v0.9.0

type StorageProvider struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   StorageProviderSpec   `json:"spec,omitempty"`
	Status StorageProviderStatus `json:"status,omitempty"`
}

StorageProvider comprises specifications that provide guidance on accessing remote storage. Currently the supported access methods are via a dedicated CSI driver or the `datasafed` tool. In case of CSI driver, the specification expounds on provisioning PVCs for that driver. As for the `datasafed` tool, the specification provides insights on generating the necessary configuration file.

func (*StorageProvider) DeepCopy added in v0.9.0

func (in *StorageProvider) DeepCopy() *StorageProvider

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

func (*StorageProvider) DeepCopyInto added in v0.9.0

func (in *StorageProvider) DeepCopyInto(out *StorageProvider)

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

func (*StorageProvider) DeepCopyObject added in v0.9.0

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

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

type StorageProviderList added in v0.9.0

type StorageProviderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StorageProvider `json:"items"`
}

StorageProviderList contains a list of `StorageProvider`.

func (*StorageProviderList) DeepCopy added in v0.9.0

func (in *StorageProviderList) DeepCopy() *StorageProviderList

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

func (*StorageProviderList) DeepCopyInto added in v0.9.0

func (in *StorageProviderList) DeepCopyInto(out *StorageProviderList)

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

func (*StorageProviderList) DeepCopyObject added in v0.9.0

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

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

type StorageProviderPhase added in v0.9.0

type StorageProviderPhase string

StorageProviderPhase defines phases of a `StorageProvider`.

+enum

const (
	// StorageProviderNotReady indicates that the `StorageProvider` is not ready,
	// usually because the specified CSI driver is not yet installed.
	StorageProviderNotReady StorageProviderPhase = "NotReady"
	// StorageProviderReady indicates that the `StorageProvider` is ready for use.
	StorageProviderReady StorageProviderPhase = "Ready"
)

type StorageProviderSpec added in v0.9.0

type StorageProviderSpec struct {
	// Specifies the name of the CSI driver used to access remote storage.
	// This field can be empty, it indicates that the storage is not accessible via CSI.
	//
	// +optional
	CSIDriverName string `json:"csiDriverName,omitempty"`

	// A Go template that used to render and generate `k8s.io/api/core/v1.Secret`
	// resources for a specific CSI driver.
	// For example, `accessKey` and `secretKey` needed by CSI-S3 are stored in this
	// `Secret` resource.
	//
	// +optional
	CSIDriverSecretTemplate string `json:"csiDriverSecretTemplate,omitempty"`

	// A Go template utilized to render and generate `kubernetes.storage.k8s.io.v1.StorageClass`
	// resources. The `StorageClass' created by this template is aimed at using the CSI driver.
	//
	// +optional
	StorageClassTemplate string `json:"storageClassTemplate,omitempty"`

	// A Go template that renders and generates `k8s.io/api/core/v1.PersistentVolumeClaim`
	// resources. This PVC can reference the `StorageClass` created from `storageClassTemplate`,
	// allowing Pods to access remote storage by mounting the PVC.
	//
	// +optional
	PersistentVolumeClaimTemplate string `json:"persistentVolumeClaimTemplate,omitempty"`

	// A Go template used to render and generate `k8s.io/api/core/v1.Secret`.
	// This `Secret` involves the configuration details required by the `datasafed` tool
	// to access remote storage. For example, the `Secret` should contain `endpoint`,
	// `bucket`, 'region', 'accessKey', 'secretKey', or something else for S3 storage.
	// This field can be empty, it means this kind of storage is not accessible via
	// the `datasafed` tool.
	//
	// +optional
	DatasafedConfigTemplate string `json:"datasafedConfigTemplate,omitempty"`

	// Describes the parameters required for storage.
	// The parameters defined here can be referenced in the above templates,
	// and `kbcli` uses this definition for dynamic command-line parameter parsing.
	//
	// +optional
	ParametersSchema *ParametersSchema `json:"parametersSchema,omitempty"`
}

StorageProviderSpec defines the desired state of `StorageProvider`.

func (*StorageProviderSpec) DeepCopy added in v0.9.0

func (in *StorageProviderSpec) DeepCopy() *StorageProviderSpec

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

func (*StorageProviderSpec) DeepCopyInto added in v0.9.0

func (in *StorageProviderSpec) DeepCopyInto(out *StorageProviderSpec)

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

type StorageProviderStatus added in v0.9.0

type StorageProviderStatus struct {
	// The phase of the `StorageProvider`. Valid phases are `NotReady` and `Ready`.
	//
	// +kubebuilder:validation:Enum={NotReady,Ready}
	Phase StorageProviderPhase `json:"phase,omitempty"`

	// Describes the current state of the `StorageProvider`.
	//
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

StorageProviderStatus defines the observed state of `StorageProvider`.

func (*StorageProviderStatus) DeepCopy added in v0.9.0

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

func (*StorageProviderStatus) DeepCopyInto added in v0.9.0

func (in *StorageProviderStatus) DeepCopyInto(out *StorageProviderStatus)

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

type SyncProgress added in v0.7.0

type SyncProgress struct {
	// Determines if the backup progress should be synchronized. If set to true,
	// a sidecar container will be instantiated to synchronize the backup progress with the
	// Backup Custom Resource (CR) status.
	//
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// Defines the interval in seconds for synchronizing the backup progress.
	//
	// +optional
	// +kubebuilder:default=60
	IntervalSeconds *int32 `json:"intervalSeconds,omitempty"`
}

func (*SyncProgress) DeepCopy added in v0.7.0

func (in *SyncProgress) DeepCopy() *SyncProgress

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

func (*SyncProgress) DeepCopyInto added in v0.7.0

func (in *SyncProgress) DeepCopyInto(out *SyncProgress)

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

type TargetVolumeInfo added in v0.7.0

type TargetVolumeInfo struct {
	// Specifies the list of volumes of targeted application that should be mounted
	// on the backup workload.
	//
	// +optional
	Volumes []string `json:"volumes,omitempty"`

	// Specifies the mount for the volumes specified in `volumes` section.
	//
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

TargetVolumeInfo specifies the volumes and their mounts of the targeted application that should be mounted in backup workload.

func (*TargetVolumeInfo) DeepCopy added in v0.7.0

func (in *TargetVolumeInfo) DeepCopy() *TargetVolumeInfo

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

func (*TargetVolumeInfo) DeepCopyInto added in v0.7.0

func (in *TargetVolumeInfo) DeepCopyInto(out *TargetVolumeInfo)

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

type VolumeClaimRestorePolicy added in v0.7.0

type VolumeClaimRestorePolicy string

VolumeClaimRestorePolicy defines restore policy for persistent volume claim. Supported policies are as follows:

1. Parallel: parallel recovery of persistent volume claim. 2. Serial: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one.

+enum +kubebuilder:validation:Enum={Parallel,Serial}

const (
	VolumeClaimRestorePolicyParallel VolumeClaimRestorePolicy = "Parallel"
	VolumeClaimRestorePolicySerial   VolumeClaimRestorePolicy = "Serial"
)

type VolumeConfig added in v0.7.0

type VolumeConfig struct {
	// Describes the volume that will be restored from the specified volume of the backup targetVolumes.
	// This is required if the backup uses a volume snapshot.
	//
	// +optional
	VolumeSource string `json:"volumeSource,omitempty"`

	// Specifies the path within the restoring container at which the volume should be mounted.
	//
	// +optional
	MountPath string `json:"mountPath,omitempty"`
}

func (*VolumeConfig) DeepCopy added in v0.7.0

func (in *VolumeConfig) DeepCopy() *VolumeConfig

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

func (*VolumeConfig) DeepCopyInto added in v0.7.0

func (in *VolumeConfig) DeepCopyInto(out *VolumeConfig)

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

type VolumeSnapshotStatus added in v0.7.0

type VolumeSnapshotStatus struct {
	// The name of the volume snapshot.
	//
	// +optional
	Name string `json:"name,omitempty"`

	// The name of the volume snapshot content.
	//
	// +optional
	ContentName string `json:"contentName,omitempty"`

	// The name of the volume.
	//
	// +optional
	VolumeName string `json:"volumeName,omitempty"`

	// The size of the volume snapshot.
	//
	// +optional
	Size string `json:"size,omitempty"`

	// Associates this volumeSnapshot with its corresponding target.
	TargetName string `json:"targetName,omitempty"`
}

func (*VolumeSnapshotStatus) DeepCopy added in v0.7.0

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

func (*VolumeSnapshotStatus) DeepCopyInto added in v0.7.0

func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus)

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