Skip to content

Commit fe6384e

Browse files
committed
VSS: use a constant backoff client cache errors
Updates the VaultStaticSecretReconciler to use a constant backoff when it encounters an error when getting a client from the factory. This is the same approach taken in the VDS and VPS controllers.
1 parent b6ecb67 commit fe6384e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

controllers/vaultstaticsecret_controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ func (r *VaultStaticSecretReconciler) Reconcile(ctx context.Context, req ctrl.Re
7676
if err != nil {
7777
r.Recorder.Eventf(o, corev1.EventTypeWarning, consts.ReasonVaultClientConfigError,
7878
"Failed to get Vault auth login: %s", err)
79-
return ctrl.Result{}, err
79+
_, jitter := computeMaxJitterWithPercent(requeueDurationOnError, 0.5)
80+
return ctrl.Result{
81+
RequeueAfter: requeueDurationOnError + time.Duration(jitter),
82+
}, nil
8083
}
8184

8285
var requeueAfter time.Duration

0 commit comments

Comments
 (0)