fix(temporal): switch to PostgreSQL (CNPG ddb-cluster) instead of broken Cassandra/ES setup
This commit is contained in:
@@ -1,65 +1,28 @@
|
|||||||
# k8s/temporal/temporal-values.yaml
|
# k8s/temporal/temporal-values.yaml
|
||||||
# Temporal — workflow engine for story-crater backend async task orchestration.
|
# Temporal — workflow engine
|
||||||
# Chart: temporal/temporal from https://go.temporal.io/helm-charts
|
# Uses external CNPG PostgreSQL for persistence (ddb-cluster)
|
||||||
#
|
# Visibility via same PostgreSQL database
|
||||||
# Uses Cassandra for default store (workflow history/events)
|
|
||||||
# Uses Elasticsearch for visibility store (namespace/workflow queries)
|
|
||||||
# This is the chart's native, well-tested configuration.
|
|
||||||
|
|
||||||
# ── Datastores configuration ────
|
# ── Disable embedded databases ────
|
||||||
# Disable auto-deployed PostgreSQL (we use external ddb for other services)
|
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
# Enable Elasticsearch for visibility store (deployed to worker node, 2Gi/4Gi memory)
|
|
||||||
elasticsearch:
|
|
||||||
enabled: true
|
|
||||||
scheme: http
|
|
||||||
host: elasticsearch-master-headless
|
|
||||||
port: 9200
|
|
||||||
version: v7
|
|
||||||
logLevel: error
|
|
||||||
auth:
|
|
||||||
enabled: false
|
|
||||||
indices:
|
|
||||||
visibility: temporal_visibility_v1
|
|
||||||
replicas: 1
|
|
||||||
|
|
||||||
# Cassandra enabled for template validation; server.config overrides with actual hosts
|
|
||||||
# Schema job template requires cassandra config to exist at top level
|
|
||||||
cassandra:
|
cassandra:
|
||||||
enabled: true
|
enabled: false
|
||||||
replicas: 3
|
|
||||||
cluster:
|
|
||||||
seedSize: 1
|
|
||||||
port: 9042
|
|
||||||
# Was landing 2 of 3 replicas on talos-cp-1 -- spread across nodes so a
|
|
||||||
# single overloaded node can't stall gossip/join for the whole ring.
|
|
||||||
affinity:
|
|
||||||
podAntiAffinity:
|
|
||||||
preferredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
- weight: 100
|
|
||||||
podAffinityTerm:
|
|
||||||
labelSelector:
|
|
||||||
matchLabels:
|
|
||||||
app: cassandra
|
|
||||||
release: temporal
|
|
||||||
topologyKey: kubernetes.io/hostname
|
|
||||||
|
|
||||||
# ── Disable schema auto-setup (will initialize manually) ─────────
|
elasticsearch:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
# ── Disable schema auto-setup ─────
|
||||||
jobs:
|
jobs:
|
||||||
autoSetup:
|
autoSetup:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
# ── Temporal server config (Cassandra + Elasticsearch persistence) ──────────────────────────────
|
# ── Temporal server config (PostgreSQL persistence) ──────────────────────────────
|
||||||
server:
|
server:
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
jobService:
|
jobService:
|
||||||
enabled: false
|
enabled: false
|
||||||
# Spread frontend/history/matching/worker across nodes instead of letting
|
|
||||||
# them stack on whichever node the scheduler prefers (was: 59 of ~80
|
|
||||||
# cluster pods on talos-cp-1 alone). History's ringpop gossip join was
|
|
||||||
# timing out because 3 of its 4 peers sat on that overloaded node.
|
|
||||||
affinity:
|
affinity:
|
||||||
podAntiAffinity:
|
podAntiAffinity:
|
||||||
preferredDuringSchedulingIgnoredDuringExecution:
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
@@ -77,22 +40,33 @@ server:
|
|||||||
numHistoryShards: 512
|
numHistoryShards: 512
|
||||||
datastores:
|
datastores:
|
||||||
default:
|
default:
|
||||||
# Cassandra for workflow history and events
|
# PostgreSQL for workflow history and events
|
||||||
driver: cassandra
|
driver: sql
|
||||||
cassandra:
|
sql:
|
||||||
hosts:
|
driver: postgres12
|
||||||
- "temporal-cassandra-0.temporal-cassandra.temporal"
|
host: ddb-cluster-rw.ddb.svc.cluster.local
|
||||||
- "temporal-cassandra-1.temporal-cassandra.temporal"
|
port: 5432
|
||||||
- "temporal-cassandra-2.temporal-cassandra.temporal"
|
database: temporal
|
||||||
port: 9042
|
user: temporal
|
||||||
keyspace: temporal
|
password: ""
|
||||||
user: user
|
maxConns: 20
|
||||||
password: "" # Cassandra auth disabled in deployment
|
maxIdleConns: 10
|
||||||
replicationFactor: 3
|
maxConnLifetime: "1h"
|
||||||
consistency:
|
connectAttributes:
|
||||||
default:
|
tx_isolation: "READ-COMMITTED"
|
||||||
consistency: local_quorum
|
visibility:
|
||||||
serialConsistency: local_serial
|
# PostgreSQL for visibility store (workflow queries)
|
||||||
|
driver: sql
|
||||||
|
sql:
|
||||||
|
driver: postgres12
|
||||||
|
host: ddb-cluster-rw.ddb.svc.cluster.local
|
||||||
|
port: 5432
|
||||||
|
database: temporal_visibility
|
||||||
|
user: temporal
|
||||||
|
password: ""
|
||||||
|
maxConns: 20
|
||||||
|
maxIdleConns: 10
|
||||||
|
maxConnLifetime: "1h"
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
||||||
@@ -103,9 +77,6 @@ web:
|
|||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
||||||
# ── Ingress ────────────────────────────────────────────────────────
|
# ── Ingress ────────────────────────────────────────────────────────
|
||||||
# Note: ingress is disabled here. Instead, we route via oauth2-proxy.
|
|
||||||
# The ingress is applied separately as k8s/temporal/temporal-ingress-oauth2.yaml
|
|
||||||
# which terminates TLS and routes to oauth2-proxy service.
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user