fix(temporal): provision schema via CNPG temporal_visibility DB + drop mysql-only tx_isolation param
This commit is contained in:
@@ -43,19 +43,20 @@ grafana:
|
|||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
# ── Schema setup/update Jobs ──────────────────────────────────────────────────
|
# ── Schema setup/update Jobs ──────────────────────────────────────────────────
|
||||||
# Disabled: ddb-cluster's seed job (k8s/data/db-init-job.yaml) already creates
|
# The `temporal` and `temporal_visibility` databases are provisioned
|
||||||
# the `temporal` and `temporal_visibility` databases and runs the Temporal
|
# declaratively by CNPG Database CRs (k8s/data/temporal-database.yaml,
|
||||||
# schema migrations out of band. Leaving these at their chart default (true)
|
# temporal-visibility-database.yaml), so createDatabase stays disabled (the
|
||||||
# would spin up a schema Job on every sync that tries to wait-for-cassandra
|
# `temporal` role also lacks CREATEDB). setup/update run temporal-sql-tool as
|
||||||
# and run cassandra-tool commands (see note above) - pointless for us even
|
# the `temporal` owner against those existing DBs to install and migrate the
|
||||||
# once correctly pointed at Postgres, since schema is already seeded.
|
# Temporal server schema — without them both DBs have zero tables and the
|
||||||
|
# server dies on "no usable database connection found" (no schema_version row).
|
||||||
schema:
|
schema:
|
||||||
createDatabase:
|
createDatabase:
|
||||||
enabled: false
|
enabled: false
|
||||||
setup:
|
setup:
|
||||||
enabled: false
|
enabled: true
|
||||||
update:
|
update:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
|
||||||
# ── Temporal server config (PostgreSQL persistence) ──────────────────────────
|
# ── Temporal server config (PostgreSQL persistence) ──────────────────────────
|
||||||
server:
|
server:
|
||||||
@@ -106,8 +107,12 @@ server:
|
|||||||
maxConns: 20
|
maxConns: 20
|
||||||
maxIdleConns: 10
|
maxIdleConns: 10
|
||||||
maxConnLifetime: "1h"
|
maxConnLifetime: "1h"
|
||||||
connectAttributes:
|
# NOTE: no `connectAttributes: { tx_isolation: ... }` here — tx_isolation
|
||||||
tx_isolation: "READ-COMMITTED"
|
# is a MySQL-only connection parameter. The Postgres `pq` driver rejects
|
||||||
|
# it ("unrecognized configuration parameter"), which killed every DB
|
||||||
|
# connection (schema-setup job AND server) with the misleading
|
||||||
|
# "no usable database connection found". Postgres defaults to READ
|
||||||
|
# COMMITTED isolation anyway, so nothing is lost by omitting it.
|
||||||
visibility:
|
visibility:
|
||||||
driver: "sql"
|
driver: "sql"
|
||||||
sql:
|
sql:
|
||||||
|
|||||||
@@ -16,5 +16,6 @@ resources:
|
|||||||
- forgejo-database.yaml
|
- forgejo-database.yaml
|
||||||
- authentik-database.yaml
|
- authentik-database.yaml
|
||||||
- temporal-database.yaml
|
- temporal-database.yaml
|
||||||
|
- temporal-visibility-database.yaml
|
||||||
# db-role-secrets.enc.yaml is applied out-of-band (SOPS-encrypted, bootstrap) —
|
# db-role-secrets.enc.yaml is applied out-of-band (SOPS-encrypted, bootstrap) —
|
||||||
# NOT listed here, or the data-schemas ArgoCD app would fail on the ciphertext.
|
# NOT listed here, or the data-schemas ArgoCD app would fail on the ciphertext.
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Database
|
||||||
|
metadata:
|
||||||
|
name: temporal-visibility
|
||||||
|
namespace: ddb
|
||||||
|
spec:
|
||||||
|
name: temporal_visibility
|
||||||
|
owner: temporal
|
||||||
|
cluster:
|
||||||
|
name: ddb-cluster
|
||||||
Reference in New Issue
Block a user