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 ¶
func (r *GarbageCollectorReconciler) Reconcile(ctx context.Context, _ ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *NonAdminBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *NonAdminBackupStorageLocationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *NonAdminBackupSynchronizerReconciler) Reconcile(ctx context.Context, _ ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *NonAdminDownloadRequestReconciler) Reconcile(ctx context.Context, req *nacv1alpha1.NonAdminDownloadRequest) (reconcile.Result, error)
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://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.20.2/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 ¶
func (r *NonAdminRestoreReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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.