backup

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package backup is responsible for reconciliation of the github.com/K0rdent/kcm/api/v1beta1.ManagementBackup objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler added in v0.1.0

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler has logic to create and reconcile github.com/vmware-tanzu/velero/pkg/apis/velero/v1.Backup objects.

func NewReconciler added in v0.1.0

func NewReconciler(cl client.Client, systemNamespace string, opts ...ReconcilerOption) *Reconciler

NewReconciler creates instance of the Reconciler.

func (*Reconciler) ReconcileBackup added in v0.1.0

func (r *Reconciler) ReconcileBackup(ctx context.Context, mgmtBackup *kcmv1.ManagementBackup) (ctrl.Result, error)

ReconcileBackup is the main reconciliation function for ManagementBackup resources. It handles different reconciliation paths based on the state of the backup: - For restored backups, it updates status after restoration - For scheduled backups, it handles scheduled execution - For one-time backups that haven't been initiated, it creates them - Otherwise, it updates status for existing backups

type ReconcilerOption added in v1.4.0

type ReconcilerOption func(*Reconciler)

ReconcilerOption is a configuration option for the Reconciler.

func WithRegionalClientFactory added in v1.4.0

func WithRegionalClientFactory(factory RegionalClientFactory) ReconcilerOption

WithRegionalClientFactory returns an option to set a custom regional client factory.

type RegionalClientFactory added in v1.4.0

type RegionalClientFactory func(context.Context, client.Client, string, *kcmv1.Region, func() (*runtime.Scheme, error)) (client.Client, *rest.Config, error)

RegionalClientFactory is a function type for creating regional clients

type Runner added in v0.1.0

type Runner struct {
	// contains filtered or unexported fields
}

Runner is a periodic runner which enqueues github.com/K0rdent/kcm/api/v1beta1.ManagementBackup for reconciliation on a schedule.

func NewRunner added in v0.1.0

func NewRunner(opts ...RunnerOpt) *Runner

NewRunner creates a new periodic Runner and configures it using the provided RunnerOpt.

func (*Runner) GetEventChannel added in v0.1.0

func (r *Runner) GetEventChannel() <-chan event.GenericEvent

GetEventChannel returns the channel sigs.k8s.io/controller-runtime/pkg/event.GenericEvent typed.

func (*Runner) Start added in v0.1.0

func (r *Runner) Start(ctx context.Context) error

Start implements the sigs.k8s.io/controller-runtime/pkg/manager.Runnable interface.

type RunnerOpt added in v0.1.0

type RunnerOpt func(c *Runner)

RunnerOpt is a function which configures the Runner.

func WithClient added in v0.1.0

func WithClient(cl client.Client) RunnerOpt

WithClient configures the Runner with the given client.

func WithInterval added in v0.1.0

func WithInterval(interval time.Duration) RunnerOpt

WithInterval configures the Runner with the given interval.

Jump to

Keyboard shortcuts

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