v1alpha1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: AGPL-3.0 Imports: 6 Imported by: 9 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the volsync v1alpha1 API group +kubebuilder:object:generate=true +groupName=volsync.backube

+kubebuilder:validation:Required

+kubebuilder:validation:Required

Index

Constants

View Source
const (
	ConditionSynchronizing     string = "Synchronizing"
	SynchronizingReasonSync    string = "SyncInProgress"
	SynchronizingReasonSched   string = "WaitingForSchedule"
	SynchronizingReasonManual  string = "WaitingForManual"
	SynchronizingReasonCleanup string = "CleaningUp"
	SynchronizingReasonError   string = "Error"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "volsync.backube", 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
)

Functions

This section is empty.

Types

type CopyMethodType

type CopyMethodType string

CopyMethodType defines the methods for creating point-in-time copies of volumes. +kubebuilder:validation:Enum=Direct;None;Clone;Snapshot

const (
	// CopyMethodDirect indicates a copy should not be performed. Data will be copied directly to/from the PVC.
	CopyMethodDirect CopyMethodType = "Direct"
	// CopyMethodNone indicates a copy should not be performed. Deprecated (replaced by CopyMethodDirect).
	CopyMethodNone CopyMethodType = "None"
	// CopyMethodClone indicates a copy should be created using volume cloning.
	CopyMethodClone CopyMethodType = "Clone"
	// CopyMethodSnapshot indicates a copy should be created using a volume
	// snapshot.
	CopyMethodSnapshot CopyMethodType = "Snapshot"
)

type ReplicationDestination

type ReplicationDestination struct {
	metav1.TypeMeta `json:",inline"`
	//+optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// spec is the desired state of the ReplicationDestination, including the
	// replication method to use and its configuration.
	Spec ReplicationDestinationSpec `json:"spec,omitempty"`
	// status is the observed state of the ReplicationDestination as determined
	// by the controller.
	//+optional
	Status *ReplicationDestinationStatus `json:"status,omitempty"`
}

ReplicationDestination defines the destination for a replicated volume +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Last sync",type="string",format="date-time",JSONPath=`.status.lastSyncTime` +kubebuilder:printcolumn:name="Duration",type="string",JSONPath=`.status.lastSyncDuration` +kubebuilder:printcolumn:name="Next sync",type="string",format="date-time",JSONPath=`.status.nextSyncTime`

func (*ReplicationDestination) DeepCopy

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

func (*ReplicationDestination) DeepCopyInto

func (in *ReplicationDestination) DeepCopyInto(out *ReplicationDestination)

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

func (*ReplicationDestination) DeepCopyObject

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

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

type ReplicationDestinationExternalSpec

type ReplicationDestinationExternalSpec struct {
	// provider is the name of the external replication provider. The name
	// should be of the form: domain.com/provider.
	Provider string `json:"provider,omitempty"`
	// parameters are provider-specific key/value configuration parameters. For
	// more information, please see the documentation of the specific
	// replication provider being used.
	Parameters map[string]string `json:"parameters,omitempty"`
}

ReplicationDestinationExternalSpec defines the configuration when using an external replication provider.

func (*ReplicationDestinationExternalSpec) DeepCopy

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

func (*ReplicationDestinationExternalSpec) DeepCopyInto

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

type ReplicationDestinationList

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

ReplicationDestinationList contains a list of ReplicationDestination +kubebuilder:object:root=true

func (*ReplicationDestinationList) DeepCopy

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

func (*ReplicationDestinationList) DeepCopyInto

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

func (*ReplicationDestinationList) DeepCopyObject

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

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

type ReplicationDestinationRcloneSpec

type ReplicationDestinationRcloneSpec struct {
	ReplicationDestinationVolumeOptions `json:",inline"`
	//RcloneConfigSection is the section in rclone_config file to use for the current job.
	RcloneConfigSection *string `json:"rcloneConfigSection,omitempty"`
	// RcloneDestPath is the remote path to sync to.
	RcloneDestPath *string `json:"rcloneDestPath,omitempty"`
	// RcloneConfig is the rclone secret name
	RcloneConfig *string `json:"rcloneConfig,omitempty"`
}

ReplicationDestinationRcloneSpec defines the field for rclone in replicationDestination.

func (*ReplicationDestinationRcloneSpec) DeepCopy

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

func (*ReplicationDestinationRcloneSpec) DeepCopyInto

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

type ReplicationDestinationResticSpec

type ReplicationDestinationResticSpec struct {
	ReplicationDestinationVolumeOptions `json:",inline"`
	// Repository is the secret name containing repository info
	Repository string `json:"repository,omitempty"`
	// cacheCapacity can be used to set the size of the restic metadata cache volume
	//+optional
	CacheCapacity *resource.Quantity `json:"cacheCapacity,omitempty"`
	// cacheStorageClassName can be used to set the StorageClass of the restic
	// metadata cache volume
	//+optional
	CacheStorageClassName *string `json:"cacheStorageClassName,omitempty"`
	// accessModes can be used to set the accessModes of restic metadata cache volume
	//+optional
	CacheAccessModes []corev1.PersistentVolumeAccessMode `json:"cacheAccessModes,omitempty"`
	// Previous specifies the number of image to skip before selecting one to restore from
	//+optional
	Previous *int32 `json:"previous,omitempty"`
	// RestoreAsOf refers to the backup that is most recent as of that time.
	// +kubebuilder:validation:Format="date-time"
	//+optional
	RestoreAsOf *string `json:"restoreAsOf,omitempty"`
}

ReplicationDestinationResticSpec defines the field for restic in replicationDestination.

func (*ReplicationDestinationResticSpec) DeepCopy

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

func (*ReplicationDestinationResticSpec) DeepCopyInto

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

type ReplicationDestinationRsyncSpec

type ReplicationDestinationRsyncSpec struct {
	ReplicationDestinationVolumeOptions `json:",inline"`
	// sshKeys is the name of a Secret that contains the SSH keys to be used for
	// authentication. If not provided, the keys will be generated.
	//+optional
	SSHKeys *string `json:"sshKeys,omitempty"`
	// serviceType determines the Service type that will be created for incoming
	// SSH connections.
	//+optional
	ServiceType *corev1.ServiceType `json:"serviceType,omitempty"`
	// address is the remote address to connect to for replication.
	//+optional
	Address *string `json:"address,omitempty"`
	// port is the SSH port to connect to for replication. Defaults to 22.
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=65535
	//+optional
	Port *int32 `json:"port,omitempty"`
	// path is the remote path to rsync from. Defaults to "/"
	//+optional
	Path *string `json:"path,omitempty"`
	// sshUser is the username for outgoing SSH connections. Defaults to "root".
	//+optional
	SSHUser *string `json:"sshUser,omitempty"`
}

func (*ReplicationDestinationRsyncSpec) DeepCopy

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

func (*ReplicationDestinationRsyncSpec) DeepCopyInto

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

type ReplicationDestinationRsyncStatus

type ReplicationDestinationRsyncStatus struct {
	// sshKeys is the name of a Secret that contains the SSH keys to be used for
	// authentication. If not provided in .spec.rsync.sshKeys, SSH keys will be
	// generated and the appropriate keys for the remote side will be placed
	// here.
	//+optional
	SSHKeys *string `json:"sshKeys,omitempty"`
	// address is the address to connect to for incoming SSH replication
	// connections.
	//+optional
	Address *string `json:"address,omitempty"`
	// port is the SSH port to connect to for incoming SSH replication
	// connections.
	//+optional
	Port *int32 `json:"port,omitempty"`
}

func (*ReplicationDestinationRsyncStatus) DeepCopy

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

func (*ReplicationDestinationRsyncStatus) DeepCopyInto

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

type ReplicationDestinationSpec

type ReplicationDestinationSpec struct {
	// trigger determines if/when the destination should attempt to synchronize
	// data with the source.
	//+optional
	Trigger *ReplicationDestinationTriggerSpec `json:"trigger,omitempty"`
	// rsync defines the configuration when using Rsync-based replication.
	//+optional
	Rsync *ReplicationDestinationRsyncSpec `json:"rsync,omitempty"`
	// rclone defines the configuration when using Rclone-based replication.
	//+optional
	Rclone *ReplicationDestinationRcloneSpec `json:"rclone,omitempty"`
	// restic defines the configuration when using Restic-based replication.
	//+optional
	Restic *ReplicationDestinationResticSpec `json:"restic,omitempty"`
	// external defines the configuration when using an external replication
	// provider.
	//+optional
	External *ReplicationDestinationExternalSpec `json:"external,omitempty"`
	// paused can be used to temporarily stop replication. Defaults to "false".
	//+optional
	Paused bool `json:"paused,omitempty"`
}

ReplicationDestinationSpec defines the desired state of ReplicationDestination

func (*ReplicationDestinationSpec) DeepCopy

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

func (*ReplicationDestinationSpec) DeepCopyInto

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

type ReplicationDestinationStatus

type ReplicationDestinationStatus struct {
	// lastSyncTime is the time of the most recent successful synchronization.
	//+optional
	LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
	// lastSyncStartTime is the time the most recent synchronization started.
	//+optional
	LastSyncStartTime *metav1.Time `json:"lastSyncStartTime,omitempty"`
	// lastSyncDuration is the amount of time required to send the most recent
	// update.
	//+optional
	LastSyncDuration *metav1.Duration `json:"lastSyncDuration,omitempty"`
	// nextSyncTime is the time when the next volume synchronization is
	// scheduled to start (for schedule-based synchronization).
	//+optional
	NextSyncTime *metav1.Time `json:"nextSyncTime,omitempty"`
	// lastManualSync is set to the last spec.trigger.manual when the manual sync is done.
	//+optional
	LastManualSync string `json:"lastManualSync,omitempty"`
	// latestImage in the object holding the most recent consistent replicated
	// image.
	//+optional
	LatestImage *corev1.TypedLocalObjectReference `json:"latestImage,omitempty"`
	// rsync contains status information for Rsync-based replication.
	Rsync *ReplicationDestinationRsyncStatus `json:"rsync,omitempty"`
	// external contains provider-specific status information. For more details,
	// please see the documentation of the specific replication provider being
	// used.
	//+optional
	External map[string]string `json:"external,omitempty"`
	// conditions represent the latest available observations of the
	// destination's state.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ReplicationDestinationStatus defines the observed state of ReplicationDestination

func (*ReplicationDestinationStatus) DeepCopy

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

func (*ReplicationDestinationStatus) DeepCopyInto

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

type ReplicationDestinationTriggerSpec

type ReplicationDestinationTriggerSpec struct {
	// schedule is a cronspec (https://en.wikipedia.org/wiki/Cron#Overview) that
	// can be used to schedule replication to occur at regular, time-based
	// intervals.
	//+kubebuilder:validation:Pattern=`^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$`
	//+optional
	Schedule *string `json:"schedule,omitempty"`
	// manual is a string value that schedules a manual trigger.
	// Once a sync completes then status.lastManualSync is set to the same string value.
	// A consumer of a manual trigger should set spec.trigger.manual to a known value
	// and then wait for lastManualSync to be updated by the operator to the same value,
	// which means that the manual trigger will then pause and wait for further
	// updates to the trigger.
	//+optional
	Manual string `json:"manual,omitempty"`
}

ReplicationDestinationTriggerSpec defines when a volume will be synchronized with the source.

func (*ReplicationDestinationTriggerSpec) DeepCopy

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

func (*ReplicationDestinationTriggerSpec) DeepCopyInto

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

type ReplicationDestinationVolumeOptions

type ReplicationDestinationVolumeOptions struct {
	// copyMethod describes how a point-in-time (PiT) image of the destination
	// volume should be created.
	CopyMethod CopyMethodType `json:"copyMethod,omitempty"`
	// capacity is the size of the destination volume to create.
	//+optional
	Capacity *resource.Quantity `json:"capacity,omitempty"`
	// storageClassName can be used to specify the StorageClass of the
	// destination volume. If not set, the default StorageClass will be used.
	//+optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// accessModes specifies the access modes for the destination volume.
	//+kubebuilder:validation:MinItems=1
	//+optional
	AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
	// volumeSnapshotClassName can be used to specify the VSC to be used if
	// copyMethod is Snapshot. If not set, the default VSC is used.
	//+optional
	VolumeSnapshotClassName *string `json:"volumeSnapshotClassName,omitempty"`
	// destinationPVC is a PVC to use as the transfer destination instead of
	// automatically provisioning one. Either this field or both capacity and
	// accessModes must be specified.
	//+optional
	DestinationPVC *string `json:"destinationPVC,omitempty"`
}

func (*ReplicationDestinationVolumeOptions) DeepCopy

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

func (*ReplicationDestinationVolumeOptions) DeepCopyInto

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

type ReplicationSource

type ReplicationSource struct {
	metav1.TypeMeta `json:",inline"`
	//+optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// spec is the desired state of the ReplicationSource, including the
	// replication method to use and its configuration.
	Spec ReplicationSourceSpec `json:"spec,omitempty"`
	// status is the observed state of the ReplicationSource as determined by
	// the controller.
	//+optional
	Status *ReplicationSourceStatus `json:"status,omitempty"`
}

ReplicationSource defines the source for a replicated volume +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Source",type="string",JSONPath=`.spec.sourcePVC` +kubebuilder:printcolumn:name="Last sync",type="string",format="date-time",JSONPath=`.status.lastSyncTime` +kubebuilder:printcolumn:name="Duration",type="string",JSONPath=`.status.lastSyncDuration` +kubebuilder:printcolumn:name="Next sync",type="string",format="date-time",JSONPath=`.status.nextSyncTime`

func (*ReplicationSource) DeepCopy

func (in *ReplicationSource) DeepCopy() *ReplicationSource

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

func (*ReplicationSource) DeepCopyInto

func (in *ReplicationSource) DeepCopyInto(out *ReplicationSource)

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

func (*ReplicationSource) DeepCopyObject

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

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

type ReplicationSourceExternalSpec

type ReplicationSourceExternalSpec struct {
	// provider is the name of the external replication provider. The name
	// should be of the form: domain.com/provider.
	Provider string `json:"provider,omitempty"`
	// parameters are provider-specific key/value configuration parameters. For
	// more information, please see the documentation of the specific
	// replication provider being used.
	Parameters map[string]string `json:"parameters,omitempty"`
}

ReplicationSourceExternalSpec defines the configuration when using an external replication provider.

func (*ReplicationSourceExternalSpec) DeepCopy

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

func (*ReplicationSourceExternalSpec) DeepCopyInto

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

type ReplicationSourceList

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

ReplicationSourceList contains a list of Source +kubebuilder:object:root=true

func (*ReplicationSourceList) DeepCopy

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

func (*ReplicationSourceList) DeepCopyInto

func (in *ReplicationSourceList) DeepCopyInto(out *ReplicationSourceList)

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

func (*ReplicationSourceList) DeepCopyObject

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

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

type ReplicationSourceRcloneSpec

type ReplicationSourceRcloneSpec struct {
	ReplicationSourceVolumeOptions `json:",inline"`
	//RcloneConfigSection is the section in rclone_config file to use for the current job.
	RcloneConfigSection *string `json:"rcloneConfigSection,omitempty"`
	// RcloneDestPath is the remote path to sync to.
	RcloneDestPath *string `json:"rcloneDestPath,omitempty"`
	// RcloneConfig is the rclone secret name
	RcloneConfig *string `json:"rcloneConfig,omitempty"`
}

ReplicationSourceRcloneSpec defines the field for rclone in replicationSource.

func (*ReplicationSourceRcloneSpec) DeepCopy

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

func (*ReplicationSourceRcloneSpec) DeepCopyInto

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

type ReplicationSourceResticSpec

type ReplicationSourceResticSpec struct {
	ReplicationSourceVolumeOptions `json:",inline"`
	// PruneIntervalDays define how often to prune the repository
	PruneIntervalDays *int32 `json:"pruneIntervalDays,omitempty"`
	// Repository is the secret name containing repository info
	Repository string `json:"repository,omitempty"`
	// ResticRetainPolicy define the retain policy
	//+optional
	Retain *ResticRetainPolicy `json:"retain,omitempty"`
	// cacheCapacity can be used to set the size of the restic metadata cache volume
	//+optional
	CacheCapacity *resource.Quantity `json:"cacheCapacity,omitempty"`
	// cacheStorageClassName can be used to set the StorageClass of the restic
	// metadata cache volume
	//+optional
	CacheStorageClassName *string `json:"cacheStorageClassName,omitempty"`
	// CacheAccessModes can be used to set the accessModes of restic metadata cache volume
	//+optional
	CacheAccessModes []corev1.PersistentVolumeAccessMode `json:"cacheAccessModes,omitempty"`
}

ReplicationSourceResticSpec defines the field for restic in replicationSource.

func (*ReplicationSourceResticSpec) DeepCopy

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

func (*ReplicationSourceResticSpec) DeepCopyInto

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

type ReplicationSourceResticStatus

type ReplicationSourceResticStatus struct {
	// lastPruned in the object holding the time of last pruned
	//+optional
	LastPruned *metav1.Time `json:"lastPruned,omitempty"`
}

ReplicationSourceResticStatus defines the field for ReplicationSourceStatus in ReplicationSourceStatus

func (*ReplicationSourceResticStatus) DeepCopy

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

func (*ReplicationSourceResticStatus) DeepCopyInto

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

type ReplicationSourceRsyncSpec

type ReplicationSourceRsyncSpec struct {
	ReplicationSourceVolumeOptions `json:",inline"`
	// sshKeys is the name of a Secret that contains the SSH keys to be used for
	// authentication. If not provided, the keys will be generated.
	//+optional
	SSHKeys *string `json:"sshKeys,omitempty"`
	// serviceType determines the Service type that will be created for incoming
	// SSH connections.
	//+optional
	ServiceType *corev1.ServiceType `json:"serviceType,omitempty"`
	// address is the remote address to connect to for replication.
	//+optional
	Address *string `json:"address,omitempty"`
	// port is the SSH port to connect to for replication. Defaults to 22.
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=65535
	//+optional
	Port *int32 `json:"port,omitempty"`
	// path is the remote path to rsync to. Defaults to "/"
	//+optional
	Path *string `json:"path,omitempty"`
	// sshUser is the username for outgoing SSH connections. Defaults to "root".
	//+optional
	SSHUser *string `json:"sshUser,omitempty"`
}

func (*ReplicationSourceRsyncSpec) DeepCopy

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

func (*ReplicationSourceRsyncSpec) DeepCopyInto

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

type ReplicationSourceRsyncStatus

type ReplicationSourceRsyncStatus struct {
	// sshKeys is the name of a Secret that contains the SSH keys to be used for
	// authentication. If not provided in .spec.rsync.sshKeys, SSH keys will be
	// generated and the appropriate keys for the remote side will be placed
	// here.
	//+optional
	SSHKeys *string `json:"sshKeys,omitempty"`
	// address is the address to connect to for incoming SSH replication
	// connections.
	//+optional
	Address *string `json:"address,omitempty"`
	// port is the SSH port to connect to for incoming SSH replication
	// connections.
	//+optional
	Port *int32 `json:"port,omitempty"`
}

func (*ReplicationSourceRsyncStatus) DeepCopy

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

func (*ReplicationSourceRsyncStatus) DeepCopyInto

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

type ReplicationSourceSpec

type ReplicationSourceSpec struct {
	// sourcePVC is the name of the PersistentVolumeClaim (PVC) to replicate.
	SourcePVC string `json:"sourcePVC,omitempty"`
	// trigger determines when the latest state of the volume will be captured
	// (and potentially replicated to the destination).
	//+optional
	Trigger *ReplicationSourceTriggerSpec `json:"trigger,omitempty"`
	// rsync defines the configuration when using Rsync-based replication.
	//+optional
	Rsync *ReplicationSourceRsyncSpec `json:"rsync,omitempty"`
	// rclone defines the configuration when using Rclone-based replication.
	//+optional
	Rclone *ReplicationSourceRcloneSpec `json:"rclone,omitempty"`
	// restic defines the configuration when using Restic-based replication.
	//+optional
	Restic *ReplicationSourceResticSpec `json:"restic,omitempty"`
	// syncthing defines the configuration when using Syncthing-based replication.
	//+optional
	Syncthing *ReplicationSourceSyncthingSpec `json:"syncthing,omitempty"`
	// external defines the configuration when using an external replication
	// provider.
	//+optional
	External *ReplicationSourceExternalSpec `json:"external,omitempty"`
	// paused can be used to temporarily stop replication. Defaults to "false".
	//+optional
	Paused bool `json:"paused,omitempty"`
}

ReplicationSourceSpec defines the desired state of ReplicationSource

func (*ReplicationSourceSpec) DeepCopy

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

func (*ReplicationSourceSpec) DeepCopyInto

func (in *ReplicationSourceSpec) DeepCopyInto(out *ReplicationSourceSpec)

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

type ReplicationSourceStatus

type ReplicationSourceStatus struct {
	// lastSyncTime is the time of the most recent successful synchronization.
	//+optional
	LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
	// lastSyncStartTime is the time the most recent synchronization started.
	//+optional
	LastSyncStartTime *metav1.Time `json:"lastSyncStartTime,omitempty"`
	// lastSyncDuration is the amount of time required to send the most recent
	// update.
	//+optional
	LastSyncDuration *metav1.Duration `json:"lastSyncDuration,omitempty"`
	// nextSyncTime is the time when the next volume synchronization is
	// scheduled to start (for schedule-based synchronization).
	//+optional
	NextSyncTime *metav1.Time `json:"nextSyncTime,omitempty"`
	// lastManualSync is set to the last spec.trigger.manual when the manual sync is done.
	//+optional
	LastManualSync string `json:"lastManualSync,omitempty"`
	// rsync contains status information for Rsync-based replication.
	Rsync *ReplicationSourceRsyncStatus `json:"rsync,omitempty"`
	// external contains provider-specific status information. For more details,
	// please see the documentation of the specific replication provider being
	// used.
	//+optional
	External map[string]string `json:"external,omitempty"`
	// conditions represent the latest available observations of the
	// source's state.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// restic contains status information for Restic-based replication.
	Restic *ReplicationSourceResticStatus `json:"restic,omitempty"`
	// contains status information when Syncthing-based replication is used.
	//+optional
	Syncthing *ReplicationSourceSyncthingStatus `json:"syncthing,omitempty"`
}

ReplicationSourceStatus defines the observed state of ReplicationSource

func (*ReplicationSourceStatus) DeepCopy

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

func (*ReplicationSourceStatus) DeepCopyInto

func (in *ReplicationSourceStatus) DeepCopyInto(out *ReplicationSourceStatus)

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

type ReplicationSourceSyncthingSpec added in v0.4.0

type ReplicationSourceSyncthingSpec struct {
	// List of Syncthing peers to be connected for syncing
	Peers []SyncthingPeer `json:"peers,omitempty"`
	// Type of service to be used when exposing the Syncthing peer
	//+optional
	ServiceType *corev1.ServiceType `json:"serviceType,omitempty"`
	// Used to set the size of the Syncthing config volume.
	//+optional
	ConfigCapacity *resource.Quantity `json:"configCapacity,omitempty"`
	// Used to set the StorageClass of the Syncthing config volume.
	//+optional
	ConfigStorageClassName *string `json:"configStorageClassName,omitempty"`
	// Used to set the accessModes of Syncthing config volume.
	//+optional
	ConfigAccessModes []corev1.PersistentVolumeAccessMode `json:"configAccessModes,omitempty"`
}

define the Syncthing field

func (*ReplicationSourceSyncthingSpec) DeepCopy added in v0.4.0

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

func (*ReplicationSourceSyncthingSpec) DeepCopyInto added in v0.4.0

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

type ReplicationSourceSyncthingStatus added in v0.4.0

type ReplicationSourceSyncthingStatus struct {
	// List of the Syncthing nodes we are currently connected to.
	Peers []SyncthingPeerStatus `json:"peers,omitempty"`
	// Device ID of the current syncthing device
	ID string `json:"ID,omitempty"`
	// Service address where Syncthing is exposed to the rest of the world
	Address string `json:"address,omitempty"`
}

func (*ReplicationSourceSyncthingStatus) DeepCopy added in v0.4.0

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

func (*ReplicationSourceSyncthingStatus) DeepCopyInto added in v0.4.0

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

type ReplicationSourceTriggerSpec

type ReplicationSourceTriggerSpec struct {
	// schedule is a cronspec (https://en.wikipedia.org/wiki/Cron#Overview) that
	// can be used to schedule replication to occur at regular, time-based
	// intervals.
	//+kubebuilder:validation:Pattern=`^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$`
	//+optional
	Schedule *string `json:"schedule,omitempty"`
	// manual is a string value that schedules a manual trigger.
	// Once a sync completes then status.lastManualSync is set to the same string value.
	// A consumer of a manual trigger should set spec.trigger.manual to a known value
	// and then wait for lastManualSync to be updated by the operator to the same value,
	// which means that the manual trigger will then pause and wait for further
	// updates to the trigger.
	//+optional
	Manual string `json:"manual,omitempty"`
}

ReplicationSourceTriggerSpec defines when a volume will be synchronized with the destination.

func (*ReplicationSourceTriggerSpec) DeepCopy

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

func (*ReplicationSourceTriggerSpec) DeepCopyInto

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

type ReplicationSourceVolumeOptions

type ReplicationSourceVolumeOptions struct {
	// copyMethod describes how a point-in-time (PiT) image of the source volume
	// should be created.
	CopyMethod CopyMethodType `json:"copyMethod,omitempty"`
	// capacity can be used to override the capacity of the PiT image.
	//+optional
	Capacity *resource.Quantity `json:"capacity,omitempty"`
	// storageClassName can be used to override the StorageClass of the PiT
	// image.
	//+optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// accessModes can be used to override the accessModes of the PiT image.
	//+kubebuilder:validation:MinItems=1
	//+optional
	AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
	// volumeSnapshotClassName can be used to specify the VSC to be used if
	// copyMethod is Snapshot. If not set, the default VSC is used.
	//+optional
	VolumeSnapshotClassName *string `json:"volumeSnapshotClassName,omitempty"`
}

func (*ReplicationSourceVolumeOptions) DeepCopy

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

func (*ReplicationSourceVolumeOptions) DeepCopyInto

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

type ResticRetainPolicy

type ResticRetainPolicy struct {
	// Hourly defines the number of snapshots to be kept hourly
	//+optional
	Hourly *int32 `json:"hourly,omitempty"`
	// Daily defines the number of snapshots to be kept daily
	//+optional
	Daily *int32 `json:"daily,omitempty"`
	// Weekly defines the number of snapshots to be kept weekly
	//+optional
	Weekly *int32 `json:"weekly,omitempty"`
	// Monthly defines the number of snapshots to be kept monthly
	//+optional
	Monthly *int32 `json:"monthly,omitempty"`
	// Yearly defines the number of snapshots to be kept yearly
	//+optional
	Yearly *int32 `json:"yearly,omitempty"`
	// Within defines the number of snapshots to be kept Within the given time period
	//+optional
	Within *string `json:"within,omitempty"`
}

ResticRetainPolicy defines the feilds for Restic backup

func (*ResticRetainPolicy) DeepCopy

func (in *ResticRetainPolicy) DeepCopy() *ResticRetainPolicy

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

func (*ResticRetainPolicy) DeepCopyInto

func (in *ResticRetainPolicy) DeepCopyInto(out *ResticRetainPolicy)

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

type SyncthingPeer added in v0.4.0

type SyncthingPeer struct {
	// The peer's address that our Syncthing node will connect to.
	Address string `json:"address"`
	// The peer's Syncthing ID.
	ID string `json:"ID"`
	// A flag that determines whether this peer should
	// introduce us to other peers sharing this volume.
	// It is HIGHLY recommended that two Syncthing peers do NOT
	// set each other as introducers as you will have a difficult time
	// disconnecting the two.
	Introducer bool `json:"introducer"`
}

SyncthingPeer Defines the necessary information needed by VolSync to configure a given peer with the running Syncthing instance.

func (*SyncthingPeer) DeepCopy added in v0.4.0

func (in *SyncthingPeer) DeepCopy() *SyncthingPeer

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

func (*SyncthingPeer) DeepCopyInto added in v0.4.0

func (in *SyncthingPeer) DeepCopyInto(out *SyncthingPeer)

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

type SyncthingPeerStatus added in v0.4.0

type SyncthingPeerStatus struct {
	// The address of the Syncthing peer.
	Address string `json:"address"`
	// ID Is the peer's Syncthing ID.
	ID string `json:"ID"`
	// Flag indicating whether peer is currently connected.
	Connected bool `json:"connected"`
	// The ID of the Syncthing peer that this one was introduced by.
	IntroducedBy string `json:"introducedBy,omitempty"`
	// A friendly name to associate the given device.
	Name string `json:"name,omitempty"`
}

SyncthingPeerStatus Is a struct that contains information pertaining to the status of a given Syncthing peer.

func (*SyncthingPeerStatus) DeepCopy added in v0.4.0

func (in *SyncthingPeerStatus) DeepCopy() *SyncthingPeerStatus

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

func (*SyncthingPeerStatus) DeepCopyInto added in v0.4.0

func (in *SyncthingPeerStatus) DeepCopyInto(out *SyncthingPeerStatus)

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