backupcontroller

package
v2.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 26 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 (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) Provision

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

Jump to

Keyboard shortcuts

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