backupcontroller

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

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

type BackupExecutor struct {
	executor.Generic
	// contains filtered or unexported fields
}

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

type BackupReconciler struct {
	Kube client.Client
}

BackupReconciler reconciles a Backup object

func (*BackupReconciler) Deprovision

func (*BackupReconciler) NewObject

func (r *BackupReconciler) NewObject() *k8upv1.Backup

func (*BackupReconciler) NewObjectList

func (r *BackupReconciler) NewObjectList() *k8upv1.BackupList

func (*BackupReconciler) Provision

func (r *BackupReconciler) Provision(ctx context.Context, obj *k8upv1.Backup) (reconcile.Result, error)

func (*BackupReconciler) ReconcileJobStatus

func (r *BackupReconciler) ReconcileJobStatus(ctx context.Context, obj *k8upv1.Backup) error

ReconcileJobStatus implements a custom job reconciliation since there can be multiple jobs per Backup (this is different from the implementation in the job package).

Jump to

Keyboard shortcuts

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