movetokube / postgres-operator

Postgres operator for Kubernetes
MIT License
161 stars 59 forks source link

Hash suffix to usernames #153

Open gcaracuel opened 5 months ago

gcaracuel commented 5 months ago

Is there any chance to disable the hash (it is actually nos a hash but a 6 chars random string) after username?

I understand the good of this but allowing in the CRD to configure that suffix length and been 0 a possible value may allow disable this.

Use case example: I am creating some PostgresUser to be used by a Helm Chart which does not support any kind of secret inyection to env nor conectionString usage but plain POSTGRES_USERNAME env is set from plain value. Usually every single Helm Chart out there support password load from a secret but not all them support the same for username. A total predictable role name will fix this.

I am happy to work on this a push a PR but want to check with users and devs of the project if this makes any sense.

prskr commented 2 months ago

I've a similar requirement.

I'm building a chart the creates a DB, some users and while I already hacked some templating into it, I think there's no additional value to add this random suffix to the role names...