File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
docs/book/src/reference/watching-resources Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ func (r *BackupBusyboxReconciler) SetupWithManager(mgr ctrl.Manager) error {
8787 return ctrl.NewControllerManagedBy (mgr).
8888 For (&examplecomv1alpha1.BackupBusybox {}). // Watch the primary resource (BackupBusybox)
8989 Watches (
90- &source. Kind {Type: & examplecomv1alpha1.Busybox {} }, // Watch the Busybox CR
90+ &examplecomv1alpha1.Busybox {}, // Watch the Busybox CR
9191 handler.EnqueueRequestsFromMapFunc (func (ctx context.Context , obj client.Object ) []reconcile.Request {
9292 return []reconcile.Request {
9393 {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ func (r *BackupBusyboxReconciler) SetupWithManager(mgr ctrl.Manager) error {
3939 return ctrl.NewControllerManagedBy (mgr).
4040 For (&examplecomv1alpha1.BackupBusybox {}). // Watch the primary resource (BackupBusybox)
4141 Watches (
42- &source. Kind {Type: & examplecomv1alpha1.Busybox {} }, // Watch the Busybox CR
42+ &examplecomv1alpha1.Busybox {}, // Watch the Busybox CR
4343 handler.EnqueueRequestsFromMapFunc (func (ctx context.Context , obj client.Object ) []reconcile.Request {
4444 // Trigger reconciliation for the BackupBusybox in the same namespace
4545 return []reconcile.Request {
@@ -66,7 +66,7 @@ func (r *BackupBusyboxReconciler) SetupWithManager(mgr ctrl.Manager) error {
6666 return ctrl.NewControllerManagedBy (mgr).
6767 For (&examplecomv1alpha1.BackupBusybox {}). // Watch the primary resource (BackupBusybox)
6868 Watches (
69- &source. Kind {Type: & examplecomv1alpha1.Busybox {} }, // Watch the Busybox CR
69+ &examplecomv1alpha1.Busybox {}, // Watch the Busybox CR
7070 handler.EnqueueRequestsFromMapFunc (func (ctx context.Context , obj client.Object ) []reconcile.Request {
7171 // Check if the Busybox resource has the label 'backup-needed: "true"'
7272 if val , ok := obj.GetLabels ()[" backup-enable" ]; ok && val == " true" {
You can’t perform that action at this time.
0 commit comments