Skip to content

Commit fac73cb

Browse files
committed
fix: use correct namespace for password secret
1 parent 3c72cac commit fac73cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/mongodb_users.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (r ReplicaSetReconciler) updateConnectionStringSecrets(ctx context.Context,
6262
pwd := ""
6363

6464
if user.Database != constants.ExternalDB {
65-
secretNamespacedName := types.NamespacedName{Name: user.PasswordSecretName, Namespace: secretNamespace}
65+
secretNamespacedName := types.NamespacedName{Name: user.PasswordSecretName, Namespace: mdb.Namespace}
6666
pwd, err = secret.ReadKey(ctx, r.client, user.PasswordSecretKey, secretNamespacedName)
6767
if err != nil {
6868
return err

0 commit comments

Comments
 (0)