Hi!
am taking rocketchat example (Running Rocket.Chat with Percona Server for MongoDB on Kubernetes - Percona Database Performance Blog) as base for my current question.
In the rocketchat example, databases and users are created by connecting to the mongo pod and executing mongo-statements manually:
use rocketchat
db.createUser({
user: "rocketChat",
pwd: passwordPrompt(),
roles: [
{ role: "readWrite", db: "rocketchat" }
]
})
use admin
db.createUser({
user: "oplogger",
pwd: passwordPrompt(),
roles: [
{ role: "read", db: "local" }
]
})
Is there any automatism possibility which can take care of this?
Something like providing client-specific databases and users via YAML (feeding the operator with instructions like creating a database, create users etc) or at least from command line (e.g. having a one-liner for kubectl would also be sufficient. something like providing the mongo statements as arguments to the percona-mongo-client pod)?
Background is, that we are using CICD pipelines and need to automate things like prepopulating databases and users.
Great job btw.