Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- type ReconcileBackupScheduled
- func (r *ReconcileBackupScheduled) Cleanup(scheduled *extensionsv1beta1.BackupScheduled, ...) error
- func (r *ReconcileBackupScheduled) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *ReconcileBackupScheduled) ScheduleNextBackup(scheduled *extensionsv1beta1.BackupScheduled, ...) (reconcile.Result, error)
- func (r *ReconcileBackupScheduled) SortBackups(scheduled *extensionsv1beta1.BackupScheduled, ...) ([]*extensionsv1beta1.Backup, []*extensionsv1beta1.Backup, ...)
Constants ¶
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 ¶
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
func (r *ReconcileBackupScheduled) ScheduleNextBackup(scheduled *extensionsv1beta1.BackupScheduled, active []*extensionsv1beta1.Backup) (reconcile.Result, error)
ScheduleNextBackup checks if a new Backup should be created.
func (*ReconcileBackupScheduled) SortBackups ¶ added in v0.4.2
func (r *ReconcileBackupScheduled) SortBackups(scheduled *extensionsv1beta1.BackupScheduled, backups extensionsv1beta1.BackupList) ([]*extensionsv1beta1.Backup, []*extensionsv1beta1.Backup, []*extensionsv1beta1.Backup, error)
SortBackups into active, successful, failed.