Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Sometimes, leap seconds or time differences between systems may cause a // backup to exist *just* before its schedule. For example, a situation has // been observed where a backup was scheduled at 12:00:00 UTC, but its // eventual creationDate was 11:59:59 UTC. This then causes another backup // to be executed at 12:00:00, i.e. two backups within a very small time // interval. To prevent this, we have a certain tolerance that allows a // backup to be created just before its scheduled time, to act as a backup // considered at that scheduled time. This is expressed as a percentage of // the normal interval. // For example, if the schedule is @hourly, the normal interval is 3600 // seconds. A tolerance factor of 1% (0.01) means a tolerance of 36 seconds, // i.e. a backup created after 11:59:24 or later will be considered scheduled // at 12:00:00, so the next backup will be created at 13:00:00 in this case. ScheduleIntervalTolerance = 0.01 // Default time-to-live for newly created backups: 3 days. DefaultTTL = 3 * 24 * time.Hour )
View Source
var ( BackupScheduleAnnotation = "backsnap.skyb.it/schedule" CurrentlyRestoringAnnotation = "backsnap.skyb.it/restoring" )
Functions ¶
This section is empty.
Types ¶
type AutomaticPVCBackupCreator ¶
type AutomaticPVCBackupCreator struct { client.Client Scheme *runtime.Scheme Clock DefaultSchedule string Namespaces []string ExcludeNamespaces []string }
func (*AutomaticPVCBackupCreator) SetupWithManager ¶
func (r *AutomaticPVCBackupCreator) SetupWithManager(mgr ctrl.Manager) error
type BackupSettings ¶
type PVCBackupReconciler ¶
type PVCBackupReconciler struct { client.Client Scheme *runtime.Scheme Clock MaxRunningBackups int SleepBetweenBackups int Namespaces []string ExcludeNamespaces []string BackupSettings BackupSettings CurrentRunningBackups map[string]struct{} }
PVCBackupReconciler reconciles a PVCBackup object
func (*PVCBackupReconciler) FindCurrentRunningBackups ¶ added in v0.3.0
func (r *PVCBackupReconciler) FindCurrentRunningBackups(ctx context.Context) error
func (*PVCBackupReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type PVCRestoreReconciler ¶
type PVCRestoreReconciler struct { client.Client Scheme *runtime.Scheme Namespaces []string ExcludeNamespaces []string BackupSettings BackupSettings }
PVCRestoreReconciler reconciles a PVCRestore object
func (*PVCRestoreReconciler) Reconcile ¶
func (r *PVCRestoreReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
nolint: gocyclo
func (*PVCRestoreReconciler) SetupWithManager ¶
func (r *PVCRestoreReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.