v1alpha1

package
v0.6.3-beta.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: AGPL-3.0 Imports: 12 Imported by: 6

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 (
	PodRestoreScopeAll       = "All"
	PodRestoreScopeReadWrite = "ReadWrite"
)

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 AddTTL added in v0.6.0

func AddTTL(ttl *string, hours int) string

AddTTL adds tll with hours

func Resource added in v0.6.0

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ToDuration

func ToDuration(ttl *string) time.Duration

ToDuration converts the ttl string to time.Duration.

Types

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 (defined by User).

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.

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 BackupLogStatus

type BackupLogStatus struct {
	// startTime records the start time of data logging.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// stopTime records the stop time of data logging.
	// +optional
	StopTime *metav1.Time `json:"stopTime,omitempty"`
}

func GetRecoverableTimeRange

func GetRecoverableTimeRange(backups []Backup) []BackupLogStatus

GetRecoverableTimeRange returns the recoverable time range array.

func (*BackupLogStatus) DeepCopy added in v0.6.0

func (in *BackupLogStatus) DeepCopy() *BackupLogStatus

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

func (*BackupLogStatus) DeepCopyInto added in v0.6.0

func (in *BackupLogStatus) DeepCopyInto(out *BackupLogStatus)

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

type BackupMethod added in v0.6.0

type BackupMethod string

BackupMethod the backup method +enum +kubebuilder:validation:Enum={snapshot,backupTool}

const (
	BackupMethodSnapshot   BackupMethod = "snapshot"
	BackupMethodBackupTool BackupMethod = "backupTool"
)

type BackupPhase

type BackupPhase string

BackupPhase The current phase. Valid values are New, InProgress, Completed, Failed. +enum +kubebuilder:validation:Enum={New,InProgress,Running,Completed,Failed,Deleting}

const (
	BackupNew        BackupPhase = "New"
	BackupInProgress BackupPhase = "InProgress"
	BackupRunning    BackupPhase = "Running"
	BackupCompleted  BackupPhase = "Completed"
	BackupFailed     BackupPhase = "Failed"
	BackupDeleting   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 (defined by User)

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 BackupPolicyHook

type BackupPolicyHook struct {
	// pre backup to perform commands
	// +optional
	PreCommands []string `json:"preCommands,omitempty"`

	// post backup to perform commands
	// +optional
	PostCommands []string `json:"postCommands,omitempty"`

	// exec command with image
	// +optional
	Image string `json:"image,omitempty"`

	// which container can exec command
	// +optional
	ContainerName string `json:"containerName,omitempty"`
}

BackupPolicyHook defines for the database execute commands before and after backup.

func (*BackupPolicyHook) DeepCopy added in v0.6.0

func (in *BackupPolicyHook) DeepCopy() *BackupPolicyHook

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

func (*BackupPolicyHook) DeepCopyInto added in v0.6.0

func (in *BackupPolicyHook) DeepCopyInto(out *BackupPolicyHook)

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

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 CR. +enum +kubebuilder:validation:Enum={Available,Failed}

const (
	PolicyAvailable BackupPolicyPhase = "Available"
	PolicyFailed    BackupPolicyPhase = "Failed"
)

type BackupPolicySecret

type BackupPolicySecret struct {
	// the secret name
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	Name string `json:"name"`

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

	// passwordKey the map key of the password in the connection credential secret
	// +kubebuilder:validation:Required
	// +kubebuilder:default=password
	PasswordKey string `json:"passwordKey,omitempty"`
}

BackupPolicySecret defines for the target database secret that backup tool can connect.

func (*BackupPolicySecret) DeepCopy added in v0.6.0

func (in *BackupPolicySecret) DeepCopy() *BackupPolicySecret

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

func (*BackupPolicySecret) DeepCopyInto added in v0.6.0

func (in *BackupPolicySecret) DeepCopyInto(out *BackupPolicySecret)

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

type BackupPolicySpec

type BackupPolicySpec struct {
	// retention describe how long the Backup should be retained. if not set, will be retained forever.
	// +optional
	Retention *RetentionSpec `json:"retention,omitempty"`

	// schedule policy for backup.
	// +optional
	Schedule Schedule `json:"schedule,omitempty"`

	// the policy for snapshot backup.
	// +optional
	Snapshot *SnapshotPolicy `json:"snapshot,omitempty"`

	// the policy for datafile backup.
	// +optional
	Datafile *CommonBackupPolicy `json:"datafile,omitempty"`

	// the policy for logfile backup.
	// +optional
	Logfile *CommonBackupPolicy `json:"logfile,omitempty"`
}

BackupPolicySpec defines the desired state of BackupPolicy

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.

func (*BackupPolicySpec) GetCommonPolicy

func (r *BackupPolicySpec) GetCommonPolicy(backupType BackupType) *CommonBackupPolicy

func (*BackupPolicySpec) GetCommonSchedulePolicy

func (r *BackupPolicySpec) GetCommonSchedulePolicy(backupType BackupType) *SchedulePolicy

type BackupPolicyStatus

type BackupPolicyStatus struct {

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

	// backup policy phase valid value: Available, Failed.
	// +optional
	Phase BackupPolicyPhase `json:"phase,omitempty"`

	// the reason if backup policy check failed.
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// information when was the last time the job was successfully scheduled.
	// +optional
	LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`

	// information when was the last time the job successfully completed.
	// +optional
	LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,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 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 the Schema for the backuprepos API

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 defines phases for BackupRepo CR. +enum +kubebuilder:validation:Enum={PreChecking,Failed,Ready,Deleting}

const (
	BackupRepoPreChecking BackupRepoPhase = "PreChecking"
	BackupRepoFailed      BackupRepoPhase = "Failed"
	BackupRepoReady       BackupRepoPhase = "Ready"
	BackupRepoDeleting    BackupRepoPhase = "Deleting"
)

type BackupRepoSpec added in v0.6.0

type BackupRepoSpec struct {
	// The storage provider used by this backup repo.
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="StorageProviderRef is immutable"
	// +kubebuilder:validation:Required
	StorageProviderRef string `json:"storageProviderRef"`

	// The requested capacity for the PVC created by this backup repo.
	// +optional
	VolumeCapacity resource.Quantity `json:"volumeCapacity,omitempty"`

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

	// Non-secret configurations for the storage provider.
	// +optional
	Config map[string]string `json:"config,omitempty"`

	// A secret that contains the credentials needed by the storage provider.
	// +optional
	Credential *corev1.SecretReference `json:"credential,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 {
	// Backup repo reconciliation phases. Valid values are PreChecking, Failed, Ready, Deleting.
	// +kubebuilder:validation:Enum={PreChecking,Failed,Ready,Deleting}
	// +optional
	Phase BackupRepoPhase `json:"phase,omitempty"`

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

	// observedGeneration is the latest generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// generatedCSIDriverSecret references the generated secret used by the CSI driver.
	// +optional
	GeneratedCSIDriverSecret *corev1.SecretReference `json:"generatedCSIDriverSecret,omitempty"`

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

	// backupPVCName is the name of the PVC used to store backup data.
	// +optional
	BackupPVCName string `json:"backupPVCName,omitempty"`

	// isDefault indicates whether this backup repo 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 BackupSnapshotStatus

type BackupSnapshotStatus struct {
	// volumeSnapshotName records the volumeSnapshot name.
	// +optional
	VolumeSnapshotName string `json:"volumeSnapshotName,omitempty"`

	// volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent
	// object representing an existing volume snapshot.
	// This field should be set if the snapshot already exists and only needs a representation in Kubernetes.
	// This field is immutable.
	// +optional
	VolumeSnapshotContentName string `json:"volumeSnapshotContentName,omitempty"`
}

func (*BackupSnapshotStatus) DeepCopy added in v0.6.0

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

func (*BackupSnapshotStatus) DeepCopyInto added in v0.6.0

func (in *BackupSnapshotStatus) DeepCopyInto(out *BackupSnapshotStatus)

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

type BackupSpec

type BackupSpec struct {
	// Which backupPolicy is applied to perform this backup
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	BackupPolicyName string `json:"backupPolicyName"`

	// Backup Type. datafile or logfile or snapshot. If not set, datafile is the default type.
	// +kubebuilder:default=datafile
	BackupType BackupType `json:"backupType"`

	// if backupType is incremental, parentBackupName is required.
	// +optional
	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.

func (*BackupSpec) Validate

func (r *BackupSpec) Validate(backupPolicy *BackupPolicy) error

Validate validates the BackupSpec and returns an error if invalid.

type BackupStatus

type BackupStatus struct {
	// +optional
	Phase BackupPhase `json:"phase,omitempty"`

	// Records parentBackupName if backupType is incremental.
	// +optional
	ParentBackupName string `json:"parentBackupName,omitempty"`

	// The date and time when the Backup is eligible for garbage collection.
	// 'null' means the Backup is NOT be cleaned except delete manual.
	// +optional
	Expiration *metav1.Time `json:"expiration,omitempty"`

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

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

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

	// Backup total size.
	// A string with capacity units in the form of "1Gi", "1Mi", "1Ki".
	// +optional
	TotalSize string `json:"totalSize,omitempty"`

	// The reason for a backup failure.
	// +optional
	FailureReason string `json:"failureReason,omitempty"`

	// remoteVolume saves the backup data.
	// +optional
	PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"`

	// backupToolName references the backup tool name.
	// +optional
	BackupToolName string `json:"backupToolName,omitempty"`

	// sourceCluster records the source cluster information for this backup.
	SourceCluster string `json:"sourceCluster,omitempty"`

	// availableReplicas available replicas for statefulSet which created by backup.
	// +optional
	AvailableReplicas *int32 `json:"availableReplicas,omitempty"`

	// manifests determines the backup metadata info.
	// +optional
	Manifests *ManifestsStatus `json:"manifests,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 BackupStatusUpdate

type BackupStatusUpdate struct {
	// specify the json path of backup object for patch.
	// example: manifests.backupLog -- means patch the backup json path of status.manifests.backupLog.
	// +optional
	Path string `json:"path,omitempty"`

	// which container name that kubectl can execute.
	// +optional
	ContainerName string `json:"containerName,omitempty"`

	// the shell Script commands to collect backup status metadata.
	// The script must exist in the container of ContainerName and the output format must be set to JSON.
	// Note that outputting to stderr may cause the result format to not be in JSON.
	// +optional
	Script string `json:"script,omitempty"`

	// useTargetPodServiceAccount defines whether this job requires the service account of the backup target pod.
	// if true, will use the service account of the backup target pod. otherwise, will use the system service account.
	// +optional
	UseTargetPodServiceAccount bool `json:"useTargetPodServiceAccount,omitempty"`

	// when to update the backup status, pre: before backup, post: after backup
	// +kubebuilder:validation:Required
	UpdateStage BackupStatusUpdateStage `json:"updateStage"`
}

func (*BackupStatusUpdate) DeepCopy added in v0.6.0

func (in *BackupStatusUpdate) DeepCopy() *BackupStatusUpdate

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

func (*BackupStatusUpdate) DeepCopyInto added in v0.6.0

func (in *BackupStatusUpdate) DeepCopyInto(out *BackupStatusUpdate)

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

type BackupStatusUpdateStage

type BackupStatusUpdateStage string

BackupStatusUpdateStage defines the stage of backup status update. +enum +kubebuilder:validation:Enum={pre,post}

const (
	PRE  BackupStatusUpdateStage = "pre"
	POST BackupStatusUpdateStage = "post"
)

type BackupTool

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

	Spec   BackupToolSpec   `json:"spec,omitempty"`
	Status BackupToolStatus `json:"status,omitempty"`
}

BackupTool is the Schema for the backuptools API (defined by provider)

func (*BackupTool) DeepCopy added in v0.6.0

func (in *BackupTool) DeepCopy() *BackupTool

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

func (*BackupTool) DeepCopyInto added in v0.6.0

func (in *BackupTool) DeepCopyInto(out *BackupTool)

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

func (*BackupTool) DeepCopyObject added in v0.6.0

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

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

type BackupToolList

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

BackupToolList contains a list of BackupTool

func (*BackupToolList) DeepCopy added in v0.6.0

func (in *BackupToolList) DeepCopy() *BackupToolList

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

func (*BackupToolList) DeepCopyInto added in v0.6.0

func (in *BackupToolList) DeepCopyInto(out *BackupToolList)

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

func (*BackupToolList) DeepCopyObject added in v0.6.0

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

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

type BackupToolManifestsStatus

type BackupToolManifestsStatus struct {
	// filePath records the file path of backup.
	// +optional
	FilePath string `json:"filePath,omitempty"`

	// volumeName records volume name of backup data pvc.
	// +optional
	VolumeName string `json:"volumeName,omitempty"`

	// Backup upload total size.
	// A string with capacity units in the form of "1Gi", "1Mi", "1Ki".
	// +optional
	UploadTotalSize string `json:"uploadTotalSize,omitempty"`

	// checksum of backup file, generated by md5 or sha1 or sha256.
	// +optional
	Checksum string `json:"checksum,omitempty"`

	// backup checkpoint, for incremental backup.
	// +optional
	Checkpoint string `json:"checkpoint,omitempty"`
}

func (*BackupToolManifestsStatus) DeepCopy added in v0.6.0

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

func (*BackupToolManifestsStatus) DeepCopyInto added in v0.6.0

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

type BackupToolRestoreCommand

type BackupToolRestoreCommand struct {
	// Array of command that apps can perform database restore.
	// like xtrabackup, that can performs restore mysql from files.
	// +optional
	RestoreCommands []string `json:"restoreCommands"`

	// Array of incremental restore commands.
	// +optional
	IncrementalRestoreCommands []string `json:"incrementalRestoreCommands,omitempty"`
}

BackupToolRestoreCommand defines the restore commands of BackupTool

func (*BackupToolRestoreCommand) DeepCopy added in v0.6.0

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

func (*BackupToolRestoreCommand) DeepCopyInto added in v0.6.0

func (in *BackupToolRestoreCommand) DeepCopyInto(out *BackupToolRestoreCommand)

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

type BackupToolSpec

type BackupToolSpec struct {
	// Backup tool Container image name.
	// +kubebuilder:validation:Required
	Image string `json:"image"`

	// which kind for run a backup tool, supported values: job, statefulSet.
	// +kubebuilder:default=job
	DeployKind DeployKind `json:"deployKind,omitempty"`

	// the type of backup tool, file or pitr
	// +kubebuilder:validation:Enum={file,pitr}
	// +kubebuilder:default=file
	Type string `json:"type,omitempty"`

	// Compute Resources required by this container.
	// Cannot be updated.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

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

	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// Array of command that apps can do database backup.
	// from invoke args
	// the order of commands follows the order of array.
	// +kubebuilder:validation:Required
	BackupCommands []string `json:"backupCommands"`

	// Array of command that apps can do database incremental backup.
	// like xtrabackup, that can performs an incremental backup file.
	// +optional
	IncrementalBackupCommands []string `json:"incrementalBackupCommands,omitempty"`

	// backup tool can support physical restore, in this case, restore must be RESTART database.
	// +kubebuilder:validation:Required
	Physical BackupToolRestoreCommand `json:"physical"`

	// backup tool can support logical restore, in this case, restore NOT RESTART database.
	// +optional
	Logical *LogicalConfig `json:"logical,omitempty"`
}

BackupToolSpec defines the desired state of BackupTool

func (*BackupToolSpec) DeepCopy added in v0.6.0

func (in *BackupToolSpec) DeepCopy() *BackupToolSpec

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

func (*BackupToolSpec) DeepCopyInto added in v0.6.0

func (in *BackupToolSpec) DeepCopyInto(out *BackupToolSpec)

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

type BackupToolStatus

type BackupToolStatus struct {
}

BackupToolStatus defines the observed state of BackupTool

func (*BackupToolStatus) DeepCopy added in v0.6.0

func (in *BackupToolStatus) DeepCopy() *BackupToolStatus

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

func (*BackupToolStatus) DeepCopyInto added in v0.6.0

func (in *BackupToolStatus) DeepCopyInto(out *BackupToolStatus)

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, marked backup set is datafile or logfile or snapshot. +enum +kubebuilder:validation:Enum={datafile,logfile,snapshot}

const (
	BackupTypeDataFile BackupType = "datafile"
	BackupTypeLogFile  BackupType = "logfile"
	BackupTypeSnapshot BackupType = "snapshot"
)

type BaseBackupType

type BaseBackupType string

BaseBackupType the base backup type. +enum +kubebuilder:validation:Enum={full,snapshot}

type BasePolicy

type BasePolicy struct {
	// target database cluster for backup.
	// +kubebuilder:validation:Required
	Target TargetCluster `json:"target"`

	// the number of automatic backups to retain. Value must be non-negative integer.
	// 0 means NO limit on the number of backups.
	// +kubebuilder:default=7
	// +optional
	BackupsHistoryLimit int32 `json:"backupsHistoryLimit,omitempty"`

	// count of backup stop retries on fail.
	// +optional
	OnFailAttempted int32 `json:"onFailAttempted,omitempty"`

	// define how to update metadata for backup status.
	// +optional
	BackupStatusUpdates []BackupStatusUpdate `json:"backupStatusUpdates,omitempty"`
}

func (*BasePolicy) DeepCopy added in v0.6.0

func (in *BasePolicy) DeepCopy() *BasePolicy

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

func (*BasePolicy) DeepCopyInto added in v0.6.0

func (in *BasePolicy) DeepCopyInto(out *BasePolicy)

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

type CommonBackupPolicy

type CommonBackupPolicy struct {
	BasePolicy `json:",inline"`

	// refer to PersistentVolumeClaim and the backup data will be stored in the corresponding persistent volume.
	// +optional
	PersistentVolumeClaim PersistentVolumeClaim `json:"persistentVolumeClaim,omitempty"`

	// refer to BackupRepo and the backup data will be stored in the corresponding repo.
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	// +optional
	BackupRepoName *string `json:"backupRepoName,omitempty"`

	// which backup tool to perform database backup, only support one tool.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	BackupToolName string `json:"backupToolName,omitempty"`
}

func (*CommonBackupPolicy) DeepCopy added in v0.6.0

func (in *CommonBackupPolicy) DeepCopy() *CommonBackupPolicy

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

func (*CommonBackupPolicy) DeepCopyInto added in v0.6.0

func (in *CommonBackupPolicy) DeepCopyInto(out *CommonBackupPolicy)

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

type CreatePVCPolicy

type CreatePVCPolicy string

CreatePVCPolicy the policy how to create the PersistentVolumeClaim for backup. +enum +kubebuilder:validation:Enum={IfNotPresent,Never}

const (
	CreatePVCPolicyNever        CreatePVCPolicy = "Never"
	CreatePVCPolicyIfNotPresent CreatePVCPolicy = "IfNotPresent"
)

type DeployKind added in v0.6.0

type DeployKind string

DeployKind which kind for run a backup tool. +enum +kubebuilder:validation:Enum={job,statefulSet}

const (
	DeployKindJob         DeployKind = "job"
	DeployKindStatefulSet DeployKind = "statefulSet"
)

type LogicalConfig added in v0.6.0

type LogicalConfig struct {
	BackupToolRestoreCommand `json:",inline"`

	// podScope defines the pod scope for restore from backup, supported values:
	// - 'All' will exec the restore command on all pods.
	// - 'ReadWrite' will pick a ReadWrite pod to exec the restore command.
	// +optional
	// +kubebuilder:default=All
	PodScope PodRestoreScope `json:"podScope,omitempty"`
}

func (*LogicalConfig) DeepCopy added in v0.6.0

func (in *LogicalConfig) DeepCopy() *LogicalConfig

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

func (*LogicalConfig) DeepCopyInto added in v0.6.0

func (in *LogicalConfig) DeepCopyInto(out *LogicalConfig)

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

type ManifestsStatus

type ManifestsStatus struct {
	// backupLog records startTime and stopTime of data logging.
	// +optional
	BackupLog *BackupLogStatus `json:"backupLog,omitempty"`

	// target records the target cluster metadata string, which is in JSON format.
	// +optional
	Target string `json:"target,omitempty"`

	// snapshot records the volume snapshot metadata.
	// +optional
	Snapshot *BackupSnapshotStatus `json:"backupSnapshot,omitempty"`

	// backupTool records information about backup files generated by the backup tool.
	// +optional
	BackupTool *BackupToolManifestsStatus `json:"backupTool,omitempty"`

	// userContext stores some loosely structured and extensible information.
	// +optional
	UserContext map[string]string `json:"userContext,omitempty"`
}

func (*ManifestsStatus) DeepCopy added in v0.6.0

func (in *ManifestsStatus) DeepCopy() *ManifestsStatus

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

func (*ManifestsStatus) DeepCopyInto added in v0.6.0

func (in *ManifestsStatus) DeepCopyInto(out *ManifestsStatus)

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

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	// the name of PersistentVolumeClaim to store backup data.
	// +optional
	Name *string `json:"name,omitempty"`

	// storageClassName is the name of the StorageClass required by the claim.
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`

	// initCapacity represents the init storage size of the PersistentVolumeClaim which should be created if not exist.
	// and the default value is 100Gi if it is empty.
	// +optional
	InitCapacity resource.Quantity `json:"initCapacity,omitempty"`

	// createPolicy defines the policy for creating the PersistentVolumeClaim, enum values:
	// - Never: do nothing if the PersistentVolumeClaim not exists.
	// - IfNotPresent: create the PersistentVolumeClaim if not present and the accessModes only contains 'ReadWriteMany'.
	// +kubebuilder:default=IfNotPresent
	// +optional
	CreatePolicy CreatePVCPolicy `json:"createPolicy,omitempty"`

	// persistentVolumeConfigMap references the configmap which contains a persistentVolume template.
	// key must be "persistentVolume" and value is the "PersistentVolume" struct.
	// support the following built-in Objects:
	// - $(GENERATE_NAME): generate a specific format "`PVC NAME`-`PVC NAMESPACE`".
	// if the PersistentVolumeClaim not exists and CreatePolicy is "IfNotPresent", the controller
	// will create it by this template. this is a mutually exclusive setting with "storageClassName".
	// +optional
	PersistentVolumeConfigMap *PersistentVolumeConfigMap `json:"persistentVolumeConfigMap,omitempty"`
}

func (*PersistentVolumeClaim) DeepCopy added in v0.6.0

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

func (*PersistentVolumeClaim) DeepCopyInto added in v0.6.0

func (in *PersistentVolumeClaim) DeepCopyInto(out *PersistentVolumeClaim)

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

type PersistentVolumeConfigMap

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

	// the namespace of the persistentVolume ConfigMap.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$`
	Namespace string `json:"namespace"`
}

func (*PersistentVolumeConfigMap) DeepCopy added in v0.6.0

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

func (*PersistentVolumeConfigMap) DeepCopyInto added in v0.6.0

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

type PodRestoreScope added in v0.6.0

type PodRestoreScope string

PodRestoreScope defines the scope pod for restore from backup. +enum +kubebuilder:validation:Enum={All,ReadWrite}

type RestoreJob

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

	Spec   RestoreJobSpec   `json:"spec,omitempty"`
	Status RestoreJobStatus `json:"status,omitempty"`
}

RestoreJob is the Schema for the restorejobs API (defined by User)

func (*RestoreJob) DeepCopy added in v0.6.0

func (in *RestoreJob) DeepCopy() *RestoreJob

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

func (*RestoreJob) DeepCopyInto added in v0.6.0

func (in *RestoreJob) DeepCopyInto(out *RestoreJob)

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

func (*RestoreJob) DeepCopyObject added in v0.6.0

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

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

type RestoreJobList

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

RestoreJobList contains a list of RestoreJob

func (*RestoreJobList) DeepCopy added in v0.6.0

func (in *RestoreJobList) DeepCopy() *RestoreJobList

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

func (*RestoreJobList) DeepCopyInto added in v0.6.0

func (in *RestoreJobList) DeepCopyInto(out *RestoreJobList)

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

func (*RestoreJobList) DeepCopyObject added in v0.6.0

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

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

type RestoreJobPhase

type RestoreJobPhase string

RestoreJobPhase The current phase. Valid values are New, InProgressPhy, InProgressLogic, Completed, Failed. +enum +kubebuilder:validation:Enum={New,InProgressPhy,InProgressLogic,Completed,Failed}

const (
	RestoreJobNew             RestoreJobPhase = "New"
	RestoreJobInProgressPhy   RestoreJobPhase = "InProgressPhy"
	RestoreJobInProgressLogic RestoreJobPhase = "InProgressLogic"
	RestoreJobCompleted       RestoreJobPhase = "Completed"
	RestoreJobFailed          RestoreJobPhase = "Failed"
)

type RestoreJobSpec

type RestoreJobSpec struct {
	// Specified one backupJob to restore.
	// +kubebuilder:validation:Required
	BackupJobName string `json:"backupJobName"`

	// the target database workload to restore
	// +kubebuilder:validation:Required
	Target TargetCluster `json:"target"`

	// array of restore volumes .
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:pruning:PreserveUnknownFields
	TargetVolumes []corev1.Volume `json:"targetVolumes" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`

	// array of restore volume mounts .
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:pruning:PreserveUnknownFields
	TargetVolumeMounts []corev1.VolumeMount `json:"targetVolumeMounts" patchStrategy:"merge" patchMergeKey:"mountPath"`

	// count of backup stop retries on fail.
	// +optional
	OnFailAttempted int32 `json:"onFailAttempted,omitempty"`
}

RestoreJobSpec defines the desired state of RestoreJob

func (*RestoreJobSpec) DeepCopy added in v0.6.0

func (in *RestoreJobSpec) DeepCopy() *RestoreJobSpec

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

func (*RestoreJobSpec) DeepCopyInto added in v0.6.0

func (in *RestoreJobSpec) DeepCopyInto(out *RestoreJobSpec)

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

type RestoreJobStatus

type RestoreJobStatus struct {

	// +optional
	Phase RestoreJobPhase `json:"phase,omitempty"`

	// The date and time when the Backup is eligible for garbage collection.
	// 'null' means the Backup is NOT be cleaned except delete manual.
	// +optional
	Expiration *metav1.Time `json:"expiration,omitempty"`

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

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

	// Job failed reason.
	// +optional
	FailureReason string `json:"failureReason,omitempty"`
}

RestoreJobStatus defines the observed state of RestoreJob

func (*RestoreJobStatus) DeepCopy added in v0.6.0

func (in *RestoreJobStatus) DeepCopy() *RestoreJobStatus

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

func (*RestoreJobStatus) DeepCopyInto added in v0.6.0

func (in *RestoreJobStatus) DeepCopyInto(out *RestoreJobStatus)

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

type RetentionSpec

type RetentionSpec struct {
	// ttl is a time string ending with the 'd'|'D'|'h'|'H' character to describe how long
	// the Backup should be retained. if not set, will be retained forever.
	// +kubebuilder:validation:Pattern:=`^\d+[d|D|h|H]$`
	// +optional
	TTL *string `json:"ttl,omitempty"`
}

func (*RetentionSpec) DeepCopy added in v0.6.0

func (in *RetentionSpec) DeepCopy() *RetentionSpec

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

func (*RetentionSpec) DeepCopyInto added in v0.6.0

func (in *RetentionSpec) DeepCopyInto(out *RetentionSpec)

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

type Schedule

type Schedule struct {
	// startingDeadlineMinutes defines the deadline in minutes for starting the backup job
	// if it misses scheduled time for any reason.
	// +optional
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=1440
	StartingDeadlineMinutes *int64 `json:"startingDeadlineMinutes,omitempty"`

	// schedule policy for snapshot backup.
	// +optional
	Snapshot *SchedulePolicy `json:"snapshot,omitempty"`

	// schedule policy for datafile backup.
	// +optional
	Datafile *SchedulePolicy `json:"datafile,omitempty"`

	// schedule policy for logfile backup.
	// +optional
	Logfile *SchedulePolicy `json:"logfile,omitempty"`
}

func (*Schedule) DeepCopy added in v0.6.0

func (in *Schedule) DeepCopy() *Schedule

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

func (*Schedule) DeepCopyInto added in v0.6.0

func (in *Schedule) DeepCopyInto(out *Schedule)

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

type SchedulePolicy

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

	// enable or disable the schedule.
	// +kubebuilder:validation:Required
	Enable bool `json:"enable"`
}

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 SnapshotPolicy

type SnapshotPolicy struct {
	BasePolicy `json:",inline"`

	// execute hook commands for backup.
	// +optional
	Hooks *BackupPolicyHook `json:"hooks,omitempty"`
}

func (*SnapshotPolicy) DeepCopy added in v0.6.0

func (in *SnapshotPolicy) DeepCopy() *SnapshotPolicy

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

func (*SnapshotPolicy) DeepCopyInto added in v0.6.0

func (in *SnapshotPolicy) DeepCopyInto(out *SnapshotPolicy)

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

type TargetCluster

type TargetCluster struct {
	// labelsSelector is used to find matching pods.
	// Pods that match this label selector are counted to determine the number of pods
	// in their corresponding topology domain.
	// +kubebuilder:validation:Required
	// +kubebuilder:pruning:PreserveUnknownFields
	LabelsSelector *metav1.LabelSelector `json:"labelsSelector"`

	// secret is used to connect to the target database cluster.
	// If not set, secret will be inherited from backup policy template.
	// if still not set, the controller will check if any system account for dataprotection has been created.
	// +optional
	Secret *BackupPolicySecret `json:"secret,omitempty"`
}

TargetCluster TODO (dsj): target cluster need redefined from Cluster API

func (*TargetCluster) DeepCopy added in v0.6.0

func (in *TargetCluster) DeepCopy() *TargetCluster

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

func (*TargetCluster) DeepCopyInto added in v0.6.0

func (in *TargetCluster) DeepCopyInto(out *TargetCluster)

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