From ff9418c0c776275ed017a416405be58e560f5066 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Fri, 8 Dec 2023 15:35:22 -0500 Subject: [PATCH] patch: loop variable deployment captured by func literal --- k8-operator/controllers/auto_redeployment.go | 1 + 1 file changed, 1 insertion(+) 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)