I’m trying to use a postgresql https://github.com/canonical/ops-lib-pgsql from multiple units. Using operator framework.
As soon as the relations is set up (
juju relate myapp:db postgresql:db) there is a user created in the database
At postgresql | Juju it says:
The database may be shared with other Juju Applications, allowing data to be shared. Which makes sense, a new user will be created for each new relation to an app,
However, I want to use the database from multiple units in the same app. What is the approach to do this? The units can’t use the same user
juju_myapp, or not what I know of… Do I need to “manually” create separate users for each units? E.g.
juju_myapp_<unit_nr>. If so, what is the best way to do this?
Let’s find out if I made myself clear