Skip to content

Commit

Permalink
added requeue in five seconds to processLocalDatasetCOS if !AuthProvided
Browse files Browse the repository at this point in the history
  • Loading branch information
pornpromk-arv committed Nov 9, 2023
1 parent 8b3957d commit d93a490
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
b64 "encoding/base64"
"strconv"
"time"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -401,7 +402,7 @@ func processLocalDatasetCOS(cr *datasets.DatasetInternal, rc *DatasetInternalRec
if !authProvided {
err := errors.NewBadRequest("No useable secret provided for authentication")
processLocalDatasetLogger.Error(err, "Failed to initialise", "Dataset.Name", cr.Name)
return reconcile.Result{}, err
return reconcile.Result{Requeue: true, RequeueAfter: 5 * time.Second}, err
}

processLocalDatasetLogger.Info("Authentication info has been successfully retrieved", "Dataset.Name", cr.Name)
Expand Down

0 comments on commit d93a490

Please sign in to comment.