Summary - Unable to start temporal on K8s with pre-created temporal and temporal_visibility empty DBs in postgres. User is not expected to have createDB permissions but has Grant All on the DBs.
I am trying to run Airbyte on my local docker desktop with an external Postgres instance located on the host machine. The airbyte-bootloader completes successfully and i can see tables in the airbyte DB. Other deployments like connector-builder-server, cron, pod-sweeper and worker are also up.
However, temporal is unable to start and hence, server and webapp are also down.
In accordance with my production scenario, i have already created the temporal and temporal_visibility DB as in production I will not get createDB permissions and DBs will be created in advance.
airbyteuser has been given GRANT ALL on these DBs.
The following variables and their values are showing up in temporal container logs as correctly configured.
- DB=postgresql
- SKIP_SCHEMA_SETUP=false
- DBNAME=temporal
- VISIBILITY_DBNAME=temporal_visibility
- DB_PORT=5432
- POSTGRES_SEEDS=host.docker.internal
- POSTGRES_USER=airbyteuser
- POSTGRES_PWD=
However, this is where the script is failing.
- temporal-sql-tool --plugin postgres --ep host.docker.internal -u airbyteuser -p 5432 create --db temporal
2023-05-03T10:32:24.233Z ERROR Unable to create SQL database. {“error”: “pq: permission denied to create database”, “logging-call-at”: “handler.go:97”}
I have also tried to change the DBNAME and VISIBILITY_DBNAME to custom values e.g. airbyte_temporal. That does not solve the problem.
Am i missing a step when configuring the external DB, or do i need to do more than just create the DB and grant permissions?
From a production perspective, does this mean that DB creation and schema setup must be done separately and configure to run the airbyte helm install with SKIP_SCHEMA_SETUP=true?
Also, Airbyte seems to be using temporal 1.13 which is a much older version and the auto-setup image is showing CVEs against it. Is there an upgrade to the latest temporal version planned? What is the highest version of temporal that Airbyte can work with?