Make `user` directive optional
The default for the user directive in pgBouncer is "not present".
Using it creates problems running this container in Kubernetes/OpenShift with securityContexts given.
Making it optional allows using a UID that's not postgres or root.
Also, I filtered the entrypoint script through shellcheck, applied autofixes, and manually applied the POSIX compatibility recommendations.
Thanks for the contribution @fuero
For my information, can you point out where user is optional under [pgbouncer]? In fact I seem unable to find documentation on that particular config item.
At this point my preferred approach would be to maintain postgres as a default value, unless disabled or overridden, out of concern for existing deployments.
In the link you mentioned under the text for the user directive it says Default: not set
Which to me says "optional"
In the link you mentioned under the text for the
userdirective it saysDefault: not setWhich to me says "optional"
Thanks, it's right at the top under "Generic settings"
I'm still worried about previously imposing postgres and suddenly switching to unset.
At this point my preferred approach would be to maintain postgres as a default value, unless disabled or overridden, out of concern for existing deployments.
@fuero if you can address this concern either by testing that going from postgres->unset is fine, or setting it as a default value, we could move forward with your PR. Thanks!