Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about the feature
Have you all considered something like:
{code:java}
apiVersion: psmdb.percona.com/v1-4-0
kind: PerconaServerMongoDBUser
spec:
user: foo
pwd: foobar
roles:
role: root
db: admin
{code}
I'm testing integration of an app with Percona Mongo and it would be nice to do everything declaratively. Presently I have a make file with a recipe that does this:
{code:java}
.PHONY: percona-tls
percona-tls:
...
kubectl exec percona-mongo-rs0-0 -- bash -c "mongo mongodb://userAdmin:userAdmin123456@localhost/admin --eval 'db.createUser({user: \"foo\", pwd: \"foobar\", roles: [{ role: \"root\", db: \"admin\" }]});'"
{code}
But you can see that being able to create a user declaratively would be superior.
Community Note
Tell us about the feature
Have you all considered something like: {code:java} apiVersion: psmdb.percona.com/v1-4-0 kind: PerconaServerMongoDBUser spec: user: foo pwd: foobar roles:
Link to JIRA