controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) Reconcile

func (*AutomaticPVCBackupCreator) SetupWithManager

func (r *AutomaticPVCBackupCreator) SetupWithManager(mgr ctrl.Manager) error

type BackupSettings

type BackupSettings struct {
	SnapshotClass   string
	VolumeClass     string
	ImagePullSecret string
	Image           string
	// S3 hostname (can be host, host:port or http://host:port/)
	S3Host            string
	S3Bucket          string
	S3AccessKeyId     string
	S3SecretAccessKey string
	ResticPassword    string
}

type Clock

type Clock interface {
	Now() time.Time
}

type PVCBackupReconciler

type PVCBackupReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Clock
	Namespaces        []string
	ExcludeNamespaces []string
	BackupSettings    BackupSettings
}

PVCBackupReconciler reconciles a PVCBackup object

func (*PVCBackupReconciler) Reconcile

func (r *PVCBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

nolint: gocyclo

func (*PVCBackupReconciler) SetupWithManager

func (r *PVCBackupReconciler) SetupWithManager(mgr ctrl.Manager) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL