Skip to content

Commit 4a4dc56

Browse files
committed
add check for static creds
1 parent bd8a3d2 commit 4a4dc56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/vaultdynamicsecret_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (r *VaultDynamicSecretReconciler) Reconcile(ctx context.Context, req ctrl.R
150150
o.Status.VaultClientMeta.CacheKey = clientCacheKey.String()
151151
o.Status.VaultClientMeta.ID = vClient.ID()
152152

153-
if o.Status.LastGeneration != o.GetGeneration() && o.Status.SecretLease.ID == "" {
153+
if !o.Spec.AllowStaticCreds && o.Status.LastGeneration != o.GetGeneration() && o.Status.SecretLease.ID == "" {
154154
logger.Info("short circuting sync, initial generation with empty lease")
155155
o.Status.LastGeneration = o.GetGeneration()
156156
if err := r.updateStatus(ctx, o); err != nil {

0 commit comments

Comments
 (0)