Root cause: pinned to temporalio/helm-charts @ 0.74.0, which uses the OLD
flat persistence schema (server.config.persistence.<store>.driver/.sql),
NOT the datastores:-wrapped schema shown in the CURRENT chart's
values/values.postgresql.yaml example (that key was introduced in a later
major version). Our old values.yaml used the datastores: key, which doesn't
exist in 0.74.0 - Helm doesn't validate unknown keys, so it was silently a
no-op. persistence.default.driver / persistence.visibility.driver stayed at
their chart default ("cassandra", with empty hosts: []) the entire time,
regardless of anything nested under datastores:.
Verified before writing this fix: cloned temporalio/helm-charts, checked out
tag temporal-0.74.0 (exact pin), ran +
against our actual values.yaml - confirmed the rendered
schema-setup Job used CASSANDRA_HOST/temporal-cassandra-tool the whole time.
Re-rendered with the corrected flat schema - zero Cassandra references,
correct postgres12 pluginName/connectAddr wired to ddb-cluster-rw.
Also fixed two compounding no-ops found the same way:
- -> real keys are schema.setup.enabled /
schema.update.enabled / schema.createDatabase.enabled (jobs.autoSetup
doesn't exist anywhere in this chart's templates or values.yaml).
- cassandra.enabled was never actually set to false (stayed at chart
default true) - now explicitly false, along with mysql/elasticsearch/
prometheus/grafana (none of which we want).
Password wiring: existingSecret: temporal-db-role + secretKey: password,
pointing at the CNPG-generated Secret - avoids storing the DB password as
plaintext in this values file. Added a new temporal-db-secret-sync
Application (sync-wave 7, one before temporal's wave 8) with a PreSync hook
Job that copies that Secret from the ddb namespace into temporal (Secrets
are namespace-scoped; CNPG creates it in ddb, but Temporal's pods run in
temporal). Deliberately a standalone directory/Application rather than
folded into temporal/'s own kustomization.yaml, which has a The Temporal CLI manages, monitors, and debugs Temporal apps. It lets you run
a local Temporal Service, start Workflow Executions, pass messages to running
Workflows, inspect state, and more.
* Start a local development service:
`temporal server start-dev`
* View help: pass `--help` to any command:
`temporal activity complete --help`
Usage:
temporal [command]
Available Commands:
activity Operate on Activity Executions
batch Manage running batch jobs
completion Generate the autocompletion script for the specified shell
config Manage config files (EXPERIMENTAL)
env Manage environments
help Help about any command
operator Manage Temporal deployments
schedule Perform operations on Schedules
server Run Temporal Server
task-queue Manage Task Queues
worker Read or update Worker state
workflow Start, list, and operate on Workflows
Flags:
--client-connect-timeout duration
The client connection timeout. 0s means no timeout.
(default 0s)
--color string
Output coloring. Accepted values: always, never, auto.
(default "auto")
--command-timeout duration
The command execution timeout. 0s means no timeout.
(default 0s)
--config-file $CONFIG_PATH/temporalio/temporal.toml
File path to read TOML config from, defaults to
$CONFIG_PATH/temporalio/temporal.toml where
`$CONFIG_PATH` is defined as `$HOME/.config` on Unix,
`$HOME/Library/Application Support` on macOS, and
`%AppData%` on Windows.
--disable-config-env
If set, disables loading environment config from
environment variables.
--disable-config-file
If set, disables loading environment config from config file.
--env ENV
Active environment name (ENV). (default "default")
--env-file $HOME/.config/temporalio/temporal.yaml
Path to environment settings file. Defaults to
$HOME/.config/temporalio/temporal.yaml.
-h, --help
help for temporal
--log-format string
Log format. Accepted values: text, json. (default "text")
--log-level string
Log level. Default is "never" for most commands and
"warn" for "server start-dev". Accepted values: debug,
info, warn, error, never. (default "never")
--no-json-shorthand-payloads
Raw payload output, even if the JSON option was used.
-o, --output string
Non-logging data output format. Accepted values: text,
json, jsonl, none. (default "text")
--profile string
Profile to use for config file.
--time-format string
Time format. Accepted values: relative, iso, raw.
(default "relative")
-v, --version
version for temporal
Use "temporal [command] --help" for more information about a command. transformer that would silently rewrite the copy-job's ddb-scoped
RoleBinding back to temporal (same class of bug just fixed in
k8s/security/iam/kustomization.yaml).
126 lines
5.1 KiB
YAML
126 lines
5.1 KiB
YAML
# k8s/temporal/temporal-values.yaml
|
|
# Temporal — workflow engine
|
|
# Uses external CNPG PostgreSQL for persistence (ddb-cluster)
|
|
# Visibility via same PostgreSQL instance, separate database.
|
|
#
|
|
# IMPORTANT — chart schema note (root-caused after Postgres never actually
|
|
# taking effect despite looking configured):
|
|
# We're pinned to temporalio/helm-charts @ 0.74.0 (see targetRevision in
|
|
# k8s/argocd/apps/60-applications.yaml), which uses the OLD flat persistence
|
|
# schema:
|
|
# server.config.persistence.<default|visibility>.driver: "sql"|"cassandra"
|
|
# server.config.persistence.<default|visibility>.sql: {...}
|
|
# NOT the newer `datastores:`-wrapped schema
|
|
# (server.config.persistence.datastores.<store>.sql) shown in the current
|
|
# chart's values/values.postgresql.yaml example - that key was introduced in
|
|
# a later major version and doesn't exist in 0.74.0. Helm doesn't validate
|
|
# unknown keys, so a `datastores:` block here is silently a no-op: Temporal
|
|
# would keep defaulting to Cassandra (with empty hosts: []) regardless of
|
|
# anything nested inside it. Verified via `helm template` against the actual
|
|
# 0.74.0 chart before writing this file - see chat history for the
|
|
# side-by-side proof (rendered manifest showed CASSANDRA_HOST env vars and
|
|
# temporal-cassandra-tool commands using the old datastores:-based values).
|
|
#
|
|
# Likewise `schema.setup.enabled` / `schema.update.enabled` /
|
|
# `schema.createDatabase.enabled` are the real toggles for the schema-setup
|
|
# Job (all default true) - there is no `jobs.autoSetup` key in this chart.
|
|
|
|
# ── Disable every bundled/optional sub-chart ─────────────────────────────────
|
|
# postgresql/mysql: never enable - we never want the chart to deploy its own
|
|
# DB, only to know how to talk to our external CNPG instance (which happens
|
|
# via server.config.persistence.*.sql below, independent of these flags).
|
|
postgresql:
|
|
enabled: false
|
|
mysql:
|
|
enabled: false
|
|
cassandra:
|
|
enabled: false
|
|
elasticsearch:
|
|
enabled: false
|
|
prometheus:
|
|
enabled: false
|
|
grafana:
|
|
enabled: false
|
|
|
|
# ── Schema setup/update Jobs ──────────────────────────────────────────────────
|
|
# Disabled: ddb-cluster's seed job (k8s/data/db-init-job.yaml) already creates
|
|
# the `temporal` and `temporal_visibility` databases and runs the Temporal
|
|
# schema migrations out of band. Leaving these at their chart default (true)
|
|
# would spin up a schema Job on every sync that tries to wait-for-cassandra
|
|
# and run cassandra-tool commands (see note above) - pointless for us even
|
|
# once correctly pointed at Postgres, since schema is already seeded.
|
|
schema:
|
|
createDatabase:
|
|
enabled: false
|
|
setup:
|
|
enabled: false
|
|
update:
|
|
enabled: false
|
|
|
|
# ── Temporal server config (PostgreSQL persistence) ──────────────────────────
|
|
server:
|
|
replicaCount: 1
|
|
jobService:
|
|
enabled: false
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/instance: temporal
|
|
topologyKey: kubernetes.io/hostname
|
|
config:
|
|
logLevel: "info"
|
|
persistence:
|
|
defaultStore: default
|
|
visibilityStore: visibility
|
|
numHistoryShards: 512
|
|
default:
|
|
driver: "sql"
|
|
sql:
|
|
driver: "postgres12"
|
|
host: "ddb-cluster-rw.ddb.svc.cluster.local"
|
|
port: 5432
|
|
database: "temporal"
|
|
user: "temporal"
|
|
# existingSecret + secretKey: point directly at the CNPG-generated
|
|
# Secret (kubernetes.io/basic-auth, keys: username/password/...)
|
|
# rather than duplicating the password in git as plaintext. When
|
|
# existingSecret is set the chart's own server-secret.yaml Secret
|
|
# template is skipped entirely (see templates/server-secret.yaml:
|
|
# `not $driverConfig.existingSecret` guards its creation).
|
|
existingSecret: "temporal-db-role"
|
|
secretKey: "password"
|
|
maxConns: 20
|
|
maxIdleConns: 10
|
|
maxConnLifetime: "1h"
|
|
connectAttributes:
|
|
tx_isolation: "READ-COMMITTED"
|
|
visibility:
|
|
driver: "sql"
|
|
sql:
|
|
driver: "postgres12"
|
|
host: "ddb-cluster-rw.ddb.svc.cluster.local"
|
|
port: 5432
|
|
database: "temporal_visibility"
|
|
user: "temporal"
|
|
existingSecret: "temporal-db-role"
|
|
secretKey: "password"
|
|
maxConns: 20
|
|
maxIdleConns: 10
|
|
maxConnLifetime: "1h"
|
|
service:
|
|
type: ClusterIP
|
|
|
|
# ── Temporal Web UI ────────────────────────────────────────────────────────
|
|
web:
|
|
replicaCount: 1
|
|
service:
|
|
type: ClusterIP
|
|
|
|
# ── Ingress ────────────────────────────────────────────────────────
|
|
ingress:
|
|
enabled: false
|