Morning all, hope this is the right forum!
Currently dealing with the creation of several users and after checking the bitnami chart available options, just seen this two:
#initdbScripts:
# initDB.js: |
## Existing ConfigMap with custom init scripts
##
# initdbScriptsConfigMap:
However, I’m facing how to hide user passwords away from those scripts and serve them as an environment variable which is provided by a config map. How is that linkage?
init_db_script.js: |
use admin
sample_user={
user: "sample-user",
pwd: ???, # How can I link this to a cm envvar incoming from a secret?
roles: [
{role: "readWriteAnyDatabase",db:"admin"}]
}
Is there an easy way to do so? Thanks a lot!