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
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.