Documentation ¶
Index ¶
- func SetupWithManager(mgr controllerruntime.Manager) error
- type BackupExecutor
- type BackupReconciler
- func (r *BackupReconciler) Deprovision(_ context.Context, _ *k8upv1.Backup) (controllerruntime.Result, error)
- func (r *BackupReconciler) NewObject() *k8upv1.Backup
- func (r *BackupReconciler) NewObjectList() *k8upv1.BackupList
- func (r *BackupReconciler) Provision(ctx context.Context, obj *k8upv1.Backup) (reconcile.Result, error)
- func (r *BackupReconciler) ReconcileJobStatus(ctx context.Context, obj *k8upv1.Backup) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupWithManager ¶
func SetupWithManager(mgr controllerruntime.Manager) error
SetupWithManager configures the reconciler.
Types ¶
type BackupExecutor ¶
BackupExecutor creates a batch.job object on the cluster. It merges all the information provided by defaults and the CRDs to ensure the backup has all information to run.
func NewBackupExecutor ¶
func NewBackupExecutor(config job.Config) *BackupExecutor
NewBackupExecutor returns a new BackupExecutor.
func (*BackupExecutor) Execute ¶
func (b *BackupExecutor) Execute(ctx context.Context) error
Execute triggers the actual batch.job creation on the cluster. It will also register a callback function on the observer so the PreBackupPods can be removed after the backup has finished.
func (*BackupExecutor) GetConcurrencyLimit ¶
func (b *BackupExecutor) GetConcurrencyLimit() int
GetConcurrencyLimit returns the concurrent jobs limit
func (*BackupExecutor) StartPreBackup ¶
func (b *BackupExecutor) StartPreBackup(ctx context.Context) (bool, error)
StartPreBackup will start the defined pods as deployments. It returns true and no error if there are no PreBackups to run after setting the ConditionPreBackupPodsReady accordingly. Returns false and error if the retrieval of PreBackupPod templates failed (with status update).
func (*BackupExecutor) StopPreBackupDeployments ¶
func (b *BackupExecutor) StopPreBackupDeployments(ctx context.Context)
StopPreBackupDeployments will remove the deployments.
type BackupReconciler ¶
BackupReconciler reconciles a Backup object
func (*BackupReconciler) Deprovision ¶
func (r *BackupReconciler) Deprovision(_ context.Context, _ *k8upv1.Backup) (controllerruntime.Result, error)
func (*BackupReconciler) NewObject ¶
func (r *BackupReconciler) NewObject() *k8upv1.Backup
func (*BackupReconciler) NewObjectList ¶
func (r *BackupReconciler) NewObjectList() *k8upv1.BackupList
func (*BackupReconciler) ReconcileJobStatus ¶
ReconcileJobStatus implements a custom job reconciliation since there can be multiple jobs per Backup (this is different from the implementation in the job package).