Add Admin and Stats Users to userlist #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In conjunction with the last PR creating the userlist if it doesn't already exist, also add in ADMIN_USERS and STATS_USERS if cooresponding ADMIN_PASSWORDS and STATS_PASSWORDS ENV variables are provided.
This is more of an out there PR and you can feel free to throw it out if you dislike it but I think it would make management easier.
For example with the following ENV variables
ADMIN_USERS=postgres,pg
ADMIN_PASSWORDS=postgres,pg
STATS_USERS=stats
STATS_PASSWORDS=stats
It produces STDOUT
Wrote postgres (admin) authentication credentials to /etc/pgbouncer/userlist.txt
Wrote pg (admin) authentication credentials to /etc/pgbouncer/userlist.txt
Wrote stats (stats) authentication credentials to /etc/pgbouncer/userlist.txt
and writes the following MD5 hashes into the userlist.txt
"postgres" "md53175bce1d3201d16594cebf9d7eb3f9d"
"pg" "md5971658c8903b1b9727ce2bc9081d71b0"
"stats" "md5a57ebe01934de43865125819a3c4af74"
This PR includes both the original PR as well as the new stuff for admin and stats users since you can't really run this new code without the touch fix.