Skip to content

Commit 6b8a499

Browse files
committed
fix tests
1 parent eafe9a7 commit 6b8a499

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

controllers/vaultdynamicsecret_controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ func (r *VaultDynamicSecretReconciler) Reconcile(ctx context.Context, req ctrl.R
272272
return ctrl.Result{RequeueAfter: computeHorizonWithJitter(requeueDurationOnError)}, nil
273273
}
274274

275-
// check if lease already exists
276-
if o.Status.SecretLease.ID != "" && o.Status.LastGeneration > 0 && o.Status.LastRenewalTime > 0 &&
275+
if !doSync && o.Status.SecretLease.ID != "" && o.Status.LastGeneration > 0 && o.Status.LastRenewalTime > 0 &&
277276
!r.SyncRegistry.Has(req.NamespacedName) && r.isRenewableLease(&o.Status.SecretLease, o, true) {
278277
horizon, inWindow := computeRelativeHorizonWithJitter(o, staticCredsJitterHorizon)
279278
if !inWindow {

0 commit comments

Comments
 (0)