Skip to content

Commit

Permalink
fix: use correct namespace for password secret (#1581)
Browse files Browse the repository at this point in the history
  • Loading branch information
limwa authored Jul 12, 2024
1 parent c85178f commit 1322fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/mongodb_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (r ReplicaSetReconciler) updateConnectionStringSecrets(ctx context.Context,
pwd := ""

if user.Database != constants.ExternalDB {
secretNamespacedName := types.NamespacedName{Name: user.PasswordSecretName, Namespace: secretNamespace}
secretNamespacedName := types.NamespacedName{Name: user.PasswordSecretName, Namespace: mdb.Namespace}
pwd, err = secret.ReadKey(ctx, r.client, user.PasswordSecretKey, secretNamespacedName)
if err != nil {
return err
Expand Down

0 comments on commit 1322fd4

Please sign in to comment.