Skip to content

Commit 8d23599

Browse files
authored
Fix VSS double reconciliation issue and prevent WebSocket teardown/reconnect. (#1278)
1 parent 6ad4ed0 commit 8d23599

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

controllers/vaultstaticsecret_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ func (r *VaultStaticSecretReconciler) Reconcile(ctx context.Context, req ctrl.Re
285285
logger.V(consts.LogLevelDebug).Info("Secret sync not required")
286286
}
287287

288+
o.Status.LastGeneration = o.GetGeneration()
289+
if err := r.updateStatus(ctx, o, true, conditions...); err != nil {
290+
return ctrl.Result{}, err
291+
}
292+
288293
if o.Spec.SyncConfig != nil && o.Spec.SyncConfig.InstantUpdates {
289294
logger.V(consts.LogLevelDebug).Info("Event watcher enabled")
290295
// ensure event watcher is running
@@ -296,11 +301,6 @@ func (r *VaultStaticSecretReconciler) Reconcile(ctx context.Context, req ctrl.Re
296301
r.unWatchEvents(o, c)
297302
}
298303

299-
o.Status.LastGeneration = o.GetGeneration()
300-
if err := r.updateStatus(ctx, o, true, conditions...); err != nil {
301-
return ctrl.Result{}, err
302-
}
303-
304304
return ctrl.Result{
305305
RequeueAfter: requeueAfter,
306306
}, nil

0 commit comments

Comments
 (0)