Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Enterprise Advanced
Created by Guest
Created on Oct 26, 2022

MongoDBUser new feature to retrieve user and password from a secret

Hi! I hope you are doing well. We would like to have an option in the "MongoDBUser" Custom Resource to reference a Kubernetes secret with user and password instead of only "spec.passwordSecretKeyRef". For us, it's also important to save the user MongoDB in a secret as well and don't pass the user through commands(helm). Basically, we would like to perform the following steps: 1. Create a secret in GCP Secret Manager with MongoDB's user/password. 2. Recover the secret using the "External Secrets tool" running in Kubernetes. 3. Refer only one secret with user/password in the "MongoDBUser" custom resources as we are doing currently for "spec.passwordSecretKeyRef"... 4. The operator will use one secret to retrieve the user and the password. As we mentioned for security reasons we would like to have the user as a secret as well. Example: --- apiVersion: mongodb.com/v1 kind: MongoDBUser metadata: name: example-database-user spec: secretKeyRef: name: mongodb-user-password-kubernetes-secret usernameKey: username passwordKey: password --- apiVersion: v1 kind: Secret data: username: Y3VzdG9tZXIx password: Y3VzdG9tZXIx
  • Guest
    Jan 20, 2023
    Does anyone want this feature?