diff --git a/k8-operator/controllers/auto_redeployment.go b/k8-operator/controllers/auto_redeployment.go index e4fa6d00f..cd5bf193b 100644 --- a/k8-operator/controllers/auto_redeployment.go +++ b/k8-operator/controllers/auto_redeployment.go @@ -36,6 +36,7 @@ func (r *InfisicalSecretReconciler) ReconcileDeploymentsWithManagedSecrets(ctx c var wg sync.WaitGroup // Iterate over the deployments and check if they use the managed secret for _, deployment := range listOfDeployments.Items { + deployment := deployment if deployment.Annotations[AUTO_RELOAD_DEPLOYMENT_ANNOTATION] == "true" && r.IsDeploymentUsingManagedSecret(deployment, infisicalSecret) { // Start a goroutine to reconcile the deployment wg.Add(1)