scheduled

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerName used for identifying which controller is performing an operation.
	ControllerName = "backup-scheduled-controller"
	// OwnerKey used to query for child Backups.
	OwnerKey = ".metadata.controller"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new BackupScheduled Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type ReconcileBackupScheduled

type ReconcileBackupScheduled struct {
	clock.Clock
	client.Client
	// contains filtered or unexported fields
}

ReconcileBackupScheduled reconciles a BackupScheduled object

func (*ReconcileBackupScheduled) Cleanup added in v0.4.2

func (r *ReconcileBackupScheduled) Cleanup(scheduled *extensionsv1beta1.BackupScheduled, successful, failed []*extensionsv1beta1.Backup) error

Cleanup old successful and failed Backups.

func (*ReconcileBackupScheduled) Reconcile

Reconcile reads that state of the cluster for a BackupScheduled object and makes changes based on the state read and what is in the BackupScheduled.Spec Automatically generate RBAC rules to allow the Controller to read and write Backups +kubebuilder:rbac:groups=extensions.skpr.io,resources=backupscheduleds,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=extensions.skpr.io,resources=backupscheduleds/status,verbs=get;update;patch +kubebuilder:rbac:groups=extensions.skpr.io,resources=backups,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=extensions.skpr.io,resources=backups/status,verbs=get;update;patch

func (*ReconcileBackupScheduled) ScheduleNextBackup added in v0.4.2

ScheduleNextBackup checks if a new Backup should be created.

func (*ReconcileBackupScheduled) SortBackups added in v0.4.2

SortBackups into active, successful, failed.

Jump to

Keyboard shortcuts

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