Configure an external PostgreSQL database
The MOSTLY AI Helm charts include a PostgreSQL container that the application uses to store data about generators, synthetic datasets, and connectors.
If necessary, you can configure an external PostgreSQL database that your company hosts internally.
Prerequisites
- Make sure that the Kubernetes cluster has access to your external PostgreSQL database.
- Encode the PostgreSQL credentials in base64 format.
Steps
-
Edit
values.yamlto configure the external PostgreSQL. -
Under
### Postgresql settings, setlocal_deploymenttofalse.values.yaml### Postgresql settings PSQL: local_deployment: false -
Paste the base64-encoded user and password in the
psqlMostlyPassandpsqlMostlyUserlines.💡The excerpt fromvalues.yamlcontains asterisks where you need to paste your encoded PostgreSQL user and password.values.yaml## External Postgresql database details encrypted with base64 (psql_local_deployment have to be setup to 'false') psql_secrets: psqlMostlyPass: ********** psqlMostlyUser: ****** ## ``` -
Under
## External Postgresql database details, configure your PostgreSQL database connection details.values.yaml## External Postgresql database details psql_cm: host: mostly-db.example.com mostly_app_db_name: mostly_app mostly_coordinator_db_name: mostly_coordinator mostly_keycloak_db_name: mostly_keycloak port: '5432' ## -
Under
## Local Postgresql deployment, set the database name and port in thenameandcontainerPortlines.values.yaml## Local Postgresql deployment # name: mostly-psql # image: # name: postgresql #<-- required to be updated with provided by Mostly AI repository # tag: 14.5.0-debian-11-r6 #<-- required to be updated with provided by Mostly AI image tag # imagePullPolicy: IfNotPresent # imagePullSecrets: mostly-docker-cfg ports: name: mostly-db containerPort: 5432 -
Save the changes to the
values.yamlfile. -
Go back to deploying with
helm upgrade ....