Description: I was trying to configure an external Azure Postgres DB to Airbyte using k8s, but temporal deployment somehow does not have access to the database. All .env and .secret variables are set, I also allowed all hosts in the Azure Postgres DB firewall. Airbyte-bootloader was able to connect and create main tables, but temporal deployment is having issues creating/accessing temporal and temporal_visibility databases (I have already created them manually, but it didn’t change the log output).
.env
DATABASE_HOST=XXXX.postgres.database.azure.com
DATABASE_PORT=5432
DATABASE_DB=airbyte
DATABASE_URL=jdbc:postgresql://<HOST>:<PORT>/<DB>?user=<USER>&password=<PASSWORD> (according to the other params)
CONFIG_DATABASE_USER=
CONFIG_DATABASE_PASSWORD=
CONFIG_DATABASE_URL=
Temporal incompatibility with PostgreSQL was fixed on version 1.2.1, we are running on version 1.7.0 here, so it shouldn’t be a problem. Don’t know if temporal.yaml or docker-compose.yaml is loading all necessary params for Azure PostgreSQL, maybe some other parameter needs to be included (but didn’t find any ref to that on both Airbyte and Azure PostgreSQL documentation).
I tried to solve it by setting the temporal env variables SQL_TLS, SQL_TLS_ENABLED and SQL_TLS_DISABLE_HOST_VERIFICATION to true, but the only result is that airbyte-server waits until it dies for the temporal namespace default to become available.
What was the proper solution?
2023-02-20 10:40:57 e[33mWARNe[m i.a.c.t.TemporalUtils(getTemporalClientWhenConnected):235 - Waiting for namespace default to be initialized in temporal...
2023-02-20 10:40:59 e[32mINFOe[m i.t.s.WorkflowServiceStubsImpl(<init>):86 - Created WorkflowServiceStubs for channel: ManagedChannelOrphanWrapper{delegate=ManagedChannelImpl{logId=9, target=airbyte-temporal:7233}}
2023-02-20 10:40:59 e[33mWARNe[m i.a.c.t.TemporalUtils(getTemporalClientWhenConnected):245 - Ignoring exception while trying to request Temporal namespace:
io.grpc.StatusRuntimeException: NOT_FOUND: Namespace default does not exist.
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271) ~[grpc-stub-1.51.1.jar:1.51.1]
Never mind, it seems that the temporal database setup was incomplete, I think it was able to create but not configure the temporal database before I added all the settings. Then it didnt re-apply the auto-setup when the database was already in place