backupcontroller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultApplicationAPIGroup is the default API group for applications
	// when not specified in ApplicationRef or ApplicationSelector.
	// Deprecated: Use backupsv1alpha1.DefaultApplicationAPIGroup instead.
	DefaultApplicationAPIGroup = backupsv1alpha1.DefaultApplicationAPIGroup
)

Variables

This section is empty.

Functions

func NormalizeApplicationRef

NormalizeApplicationRef sets the default apiGroup to DefaultApplicationAPIGroup if it's not specified. Deprecated: Use backupsv1alpha1.NormalizeApplicationRef instead.

Types

type BackupJobReconciler

type BackupJobReconciler struct {
	client.Client
	dynamic.Interface
	meta.RESTMapper
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

BackupJobReconciler reconciles BackupJob with a strategy from the strategy.backups.cozystack.io API group.

func (*BackupJobReconciler) Reconcile

func (r *BackupJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*BackupJobReconciler) SetupWithManager

func (r *BackupJobReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers our controller with the Manager and sets up watches.

type PlanReconciler

type PlanReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

PlanReconciler reconciles a Plan object

func (*PlanReconciler) Reconcile

func (r *PlanReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PlanReconciler) SetupWithManager

func (r *PlanReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers our controller with the Manager and sets up watches.

type ResolvedBackupConfig

type ResolvedBackupConfig struct {
	StrategyRef corev1.TypedLocalObjectReference
	Parameters  map[string]string
}

ResolvedBackupConfig contains the resolved strategy and storage configuration from a BackupClass.

func ResolveBackupClass

func ResolveBackupClass(
	ctx context.Context,
	c client.Client,
	backupClassName string,
	applicationRef corev1.TypedLocalObjectReference,
) (*ResolvedBackupConfig, error)

ResolveBackupClass resolves a BackupClass and finds the matching strategy for the given application. It normalizes the applicationRef's apiGroup (defaults to apps.cozystack.io if not specified) and matches it against the strategies in the BackupClass.

type RestoreJobReconciler

type RestoreJobReconciler struct {
	client.Client
	dynamic.Interface
	meta.RESTMapper
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

RestoreJobReconciler reconciles RestoreJob objects. It routes RestoreJobs to strategy-specific handlers based on the strategy referenced in the Backup that the RestoreJob is restoring from.

func (*RestoreJobReconciler) Reconcile

func (r *RestoreJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*RestoreJobReconciler) SetupWithManager

func (r *RestoreJobReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers our controller with the Manager and sets up watches.

type S3Credentials

type S3Credentials struct {
	BucketName      string
	Endpoint        string
	Region          string
	AccessKeyID     string
	AccessSecretKey string
}

S3Credentials holds the discovered S3 credentials from a Bucket storageRef

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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