Give time to the apiserver to update the object between 2 calls

This commit is contained in:
jandre 2021-02-22 23:12:31 +01:00
parent 03b16f5f3c
commit 809fdc659f

View File

@ -258,6 +258,7 @@ func (r *BackupSessionReconciler) Reconcile(req ctrl.Request) (ctrl.Result, erro
ctx := context.Background()
// your logic here
time.Sleep(300 * time.Millisecond)
r.BackupSession = &formolv1alpha1.BackupSession{}
if err := r.Get(ctx, req.NamespacedName, r.BackupSession); err != nil {
log.Error(err, "unable to get backupsession")