controller

package
v0.0.0-...-a9be432 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package controller contains all controllers of the project

Package controller contains all controllers of the project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbageCollectorReconciler

type GarbageCollectorReconciler struct {
	client.Client
	Scheme                *runtime.Scheme
	OADPNamespace         string
	Frequency             time.Duration
	RequireApprovalForBSL bool
}

GarbageCollectorReconciler reconciles Velero objects

func (*GarbageCollectorReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*GarbageCollectorReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NonAdminBackupReconciler

type NonAdminBackupReconciler struct {
	client.Client
	Scheme             *runtime.Scheme
	EnforcedBackupSpec *velerov1.BackupSpec
	OADPNamespace      string
}

NonAdminBackupReconciler reconciles a NonAdminBackup object

func (*NonAdminBackupReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state, defined in NonAdminBackup object Spec.

func (*NonAdminBackupReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NonAdminBackupStorageLocationReconciler

type NonAdminBackupStorageLocationReconciler struct {
	client.Client
	Scheme                *runtime.Scheme
	EnforcedBslSpec       *oadpv1alpha1.EnforceBackupStorageLocationSpec
	DefaultSyncPeriod     *time.Duration
	OADPNamespace         string
	RequireApprovalForBSL bool
	SyncPeriod            time.Duration
}

NonAdminBackupStorageLocationReconciler reconciles a NonAdminBackupStorageLocation object

func (*NonAdminBackupStorageLocationReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*NonAdminBackupStorageLocationReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager. Note: Adding Secret Watch within the namespace is being considered. Challenges with Secret Watch:

  • Secret updates without NaBSL object updates would be missed
  • One secret can be used by multiple NaBSL objects
  • Would need to add VeleroBackupStorageLocation UUID labels/annotations to ensure correct Secret-to-NaBSL mapping or get all the NaBSL objects and check if that particular secret is being used by any of them.

type NonAdminBackupSynchronizerReconciler

type NonAdminBackupSynchronizerReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	OADPNamespace string
	SyncPeriod    time.Duration
}

NonAdminBackupSynchronizerReconciler reconciles BackupStorageLocation objects

func (*NonAdminBackupSynchronizerReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*NonAdminBackupSynchronizerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NonAdminDownloadRequestReconciler

type NonAdminDownloadRequestReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	OADPNamespace string
}

NonAdminDownloadRequestReconciler reconciles a NonAdminDownloadRequest object

func (*NonAdminDownloadRequestReconciler) Reconcile

Reconcile the NonAdminDownloadRequest object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

This reconcile implements ObjectReconciler https://pkgo.dev/sigs.k8s.io/[email protected]/pkg/reconcile#ObjectReconciler Each reconciliation event gets the associated object from Kubernetes before passing it to Reconcile Notes for test, this function expect req to come in with k8s UID already populated like real cluster

func (*NonAdminDownloadRequestReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager. We are using predicates within For, and Watches itself, instead of defining complicated CompositePredicate that applies to all watches/fors. This approach is more readable and less lines of code, and is self contained within each controller. Other controllers had to build CompositePredicate because they used EventFilter which applied to all watches.

type NonAdminRestoreReconciler

type NonAdminRestoreReconciler struct {
	client.Client
	Scheme              *runtime.Scheme
	EnforcedRestoreSpec *velerov1.RestoreSpec
	OADPNamespace       string
}

NonAdminRestoreReconciler reconciles a NonAdminRestore object

func (*NonAdminRestoreReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state, defined in NonAdminRestore object Spec.

func (*NonAdminRestoreReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳