From 9953d1970f5eeca1c2872641eb26ed63b7b16125 Mon Sep 17 00:00:00 2001 From: "ryo.hanafusa" Date: Wed, 26 Jun 2024 03:05:40 +0000 Subject: [PATCH] Add log to check requeuing request --- controllers/pvc_controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/pvc_controller.go b/controllers/pvc_controller.go index 590e4e5..5a62b3a 100644 --- a/controllers/pvc_controller.go +++ b/controllers/pvc_controller.go @@ -47,6 +47,7 @@ func (r *pvcReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R pvc := &corev1.PersistentVolumeClaim{} if err := r.Get(ctx, req.NamespacedName, pvc); err != nil { if apierrors.IsNotFound(err) { + logger.Info(fmt.Sprintf("Requeue request because pvc='%s' is not found.", req.NamespacedName)) return requeueResult(10 * time.Second), nil } return ctrl.Result{}, xerrors.Errorf("Unexpected error occurred.: %w", err) @@ -54,6 +55,7 @@ func (r *pvcReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R b := &fluentpvcv1alpha1.FluentPVCBinding{} if err := r.Get(ctx, client.ObjectKey{Namespace: req.Namespace, Name: pvc.Name}, b); err != nil { if apierrors.IsNotFound(err) { + logger.Info(fmt.Sprintf("Requeue request because fluentpvcbinding='%s' (namespace='%s') is not found.", pvc.Name, req.Namespace)) return requeueResult(10 * time.Second), nil } return ctrl.Result{}, xerrors.Errorf("Unexpected error occurred.: %w", err)