Specify PostreSQL configuration for Helm Deployment via k8s secret

Hello!

I am trying to deploy the temporal helm chart into a k8s cluster.
I k8s cluster I have PostgreSQL available.
I want to use this database as persistence layer for temporal.

I have found server.config.persistence.visibility.sql.existingSecret property to specify pre-created secret containing a password for the database.
But I need a way to specify full sql/postgreSQL configuration via the secret (host, port, db, user, password) as I am going to use it for multiple environments and don’t know all configs in advance, as they are auto generated.
I don’t want to manually update helm chart values on each new environment deployment and/or database instance change

Unfortunately, I didn’t find a way to achieve my need using the mentioned above chart.

Could you, please, help me to solve this issue?

FYI: Keycloak helm chart provides this functionality via existingSecretXXXKey parameters

Regards,
Maksim Yesman.