I am installing postgres as a dependency in my helm chart, and need to retrieve the connection details.
Postgres connection URIs in kubernetes are of the form:
postgres://username:[email protected]:port/dbname
The username, password, namespace, port, and dbname are all easily accessible through .Values.postgresql...., and .Release.Namespace, but the service name is initialized using the subchart template common.names.fullname.
Accessing subchart templates is surprisingly not a thing, and probably wouldn't work anyways due to context changes.
What's a simple way to configure my application to access the database?