How to reset the PostgreSql password?

POSTGESQL FOR HELM: Getting SQLSTATE 28P01 password authentication failed for user in PostgreSQL

AuthorFullName__c
Brian Wood
articleNumber
000006095
ft:sourceType
Salesforce
FirstPublishedDate
2024-05-16T07:48:37Z
lastModifiedDate
2024-05-16T07:48:37Z
VersionNumber
1
To reset the PostgreSql password follow the steps below:
1. Log into the postgreSql pod using
kubectl exec -it <postgres pod name> -n <namespace> -- bash

2. Update the pg_hba.conf file with the following command so we can log into without a password
echo "local    all             all                                     trust" >/opt/bitnami/postgresql/conf/pg_hba.conf

3. Run the following command to reload the pg_hba.conf file
/opt/bitnami/postgresql/bin/pg_ctl reload

4. Log into psql as postgres user and then update the user password to the password currently in the secret(Note: please name sure this is the name password being passed in postgresql.postgresqlPassword parameter in the values.yaml)
sql -U postgres
ALTER USER user_name WITH PASSWORD 'new_password;
\q

5. Exit the pods and then do a helm upgrade –install to redeploy the pods. Please make sure that both the application and the postgres pods are restarted.

Once this is complete we should have the correct password in both the secret and PostgreSql database and we should no longer be receiving an invalid password error.