A dalp Helm upgrade updates the platform release and runs its database migration Job. With the default pre-upgrade hook, the Job must succeed before Helm updates application Deployments. Database changes are separate from the application rollout and do not reverse with helm rollback. Check migration compatibility, recovery points, and any required index rebuild before the upgrade. To move a 3.1 or 3.0 deployment to 3.2, follow Upgrade a deployment to DALP 3.2.
What runs, and when
The dapp subchart renders a Kubernetes Job named <release>-migrations whenever dapp.migrator.enabled is true, which is the shipped default. Set dapp. and no migration runs, so your application pods start against whatever schema the database already has. That setting is for a pipeline that runs migrations through its own tooling before it calls helm upgrade. On every other path, disabling it removes the check between a schema change and a pod that expects it.
dapp.migrator.hookType decides when the Job runs. Only the pre hook is a hard gate.
With pre, the chart also runs <release>- after rollout (post-, weight 10) to migrate rows written by old pods during rollout. Pass --wait to helm upgrade so the catch-up waits until new pods replace old ones. Both Jobs carry app. (kubectl get jobs -). Set dapp. if a second Job per upgrade is unwanted.
Init containers wait for PostgreSQL (120-second default timeout) and fetch a Conjur token when Conjur is enabled. That wait counts against activeDeadlineSeconds (default 600 seconds, backoff), so a slow database eats into the migration budget before the migration command starts.
The migrator connects directly to PostgreSQL through a dedicated migration Secret, bypassing PgBouncer so session-scoped advisory locks work. Configuration and optional Conjur summon wrapping match the dapp runtime pods.
Optional migration-only variables under dapp.migrator.env:
TXSIGNER_DATABASE_URL: reads the legacy pre-3.1 transaction signer database during the 3.2 custody census (see Prepare the custody census).ENCRYPTION_andMASTER_ PASSWORD ENCRYPTION_: runs non-Conjur encryption key rotation (see Encryption at rest).PREVIOUS_ MASTER_ PASSWORD PLATFORM_: restores the platform administrator role to an existing password account for one upgrade (see Restore the platform administrator role).ADMIN_ RECOVERY_ EMAIL
Under pre, Helm leaves running Deployments untouched until the migration Job succeeds, though migration locks or schema changes can still affect live traffic. Plan upgrades inside a maintenance window.
An index rebuild is never a Helm gate. When a release requires one, the rebuild drains in the background while pods serve, and affected historical read models stay provisional until it finishes. Watch Platform status → Data freshness → Indexing until every network returns from “Reindexing” to “Healthy”.
The pre-upgrade hook holds the application rollout while the migration runs, and an index rebuild continues alongside without gating the release.
What a failed migration leaves behind
The Job's hook delete policy defaults to before-, without hook-failed. A hook-failed policy would make Helm delete the failed Job and its pod immediately, which removes the pod-local evidence before you inspect it. Centralised logs may still retain the error. With the default policy, Helm leaves a failed migration Job and its pod in the cluster for you to inspect (kubectl logs job/, kubectl describe job/) until the next upgrade attempt, at which point before-hook-creation deletes the previous Job to make room for the new one.
Helm's hook delete policy is not the only cleanup timer. The Job also sets ttlSecondsAfterFinished to 86400 seconds (24 hours), so the cluster deletes finished or failed Jobs after 24 hours regardless of hookDeletePolicy. Raise dapp. if your team needs more than 24 hours to pull failure logs.
Before you upgrade
- Drain waiting workflows (see Drain waiting workflows before you upgrade).
- A 3.2 migrations Job copies each person's 3.1 KYC profile into one profile per organisation they belong to, then drops the old shared profile, all in one run. If it stops with
user profile upgrade unfinished, run the Job again and it copies the rest. Nothing is dropped before every membership has its copy. - If the database ran a 3.2 pre-release build, confirm that build finished its migration Job (see Check the starting state).
- Read the target release notes for any required index rebuild. A migration Job runs on every
helm upgradeunlessdapp.. See Upgrade to 3.2 and Supply chain and support policy.migrator. enabled: false - If your pooler does not track named prepared statements (PgBouncer before 1.21, statement mode, or a session-pinning proxy), set
global.(see Pooler requirements for prepared statements).dalp App. config. database. prepared Statement Cache Size: 0 - Confirm PostgreSQL has direct connection headroom inside
max_connectionsand can finish within the 10-minute defaultdapp.migrator.timeout(see How application pods reach Postgres). - If
NetworkPolicyis enforced, verify the migration Job's egress rule allows your PostgreSQL host and port. That policy ships at an earlier hook weight, and a wrong rule blocks the pre-upgrade hook before manifests apply. - Verify
dapp.(default 86400 seconds) and sizemigrator. ttl Seconds After Finished helm upgrade --for both the migration Job and workload rollout (see Helm charts).timeout
Drain waiting workflows before you upgrade
The Workflow Engine replays each waiting workflow from its step journal after a restart. Waiting workflows survive an upgrade only if the new release still reads those step names and data, which the release does not verify automatically. Because funding pauses can stay open up to pauseWindowSeconds (up to 7 days, see Gas settings), finish or cancel waiting workflows before upgrading. Moving from 3.1 to 3.2 also requires Finish in-flight work.
- List unfinished workflows per organisation with
GET /api/, or open Platform status → Workflows (Platform status).v2/ platform- status/ workflows- list?limit=500 - Check each item's
status. Treat bothwaitingandrunningas unfinished. Unfinished items appear first, andtruncated: truemeans more rows exist pastlimit. - Wait for each unfinished workflow to complete, or cancel its operation in the Console.
- Re-check until zero items show
waitingorrunning, then runhelm upgrade.
Investigate any running workflow with stalled: true before cancelling it (see Platform status troubleshooting).
After you upgrade
All charts in a release share one version (see Subcharts). After the upgrade:
- Confirm
helm listshows the target chart version andhelm history <release>shows the expected revision. - Confirm both migration Jobs succeeded with
kubectl get jobs -.l app. kubernetes. io/ component=migrations - For releases requiring an index rebuild, open Platform status → Data freshness → Indexing and wait for every network to move from “Reindexing” to “Healthy”.
Rolling back after a bad upgrade
helm rollback <release> <revision> reverts Kubernetes manifests to the prior release, leaving completed schema migrations and altered database rows intact. Rolling back manifests alone after an incompatible schema change leaves older pods running against a newer schema they cannot read.
The same holds for index rebuilds, which run as background indexer work outside Helm hooks and are not reversed by helm rollback.
Retry safety depends on the failed migration and the state it left behind. Treat a failed migration, and any rollback decision that follows it, as a stop-and-inspect event: read the Job's logs, confirm what state the schema is in, and involve whoever owns your database change process before retrying or rolling back. Do not assume a backoffLimit retry is always safe to repeat.
To return to the previous version after a migration changed the schema, restore the recovery point you took before the upgrade, then run helm rollback <release> <revision>. Records written after that recovery point are not in the restored database. Backup and disaster recovery lists what to restore and in what order.
Frequently asked questions
Is a helm upgrade --timeout failure the same thing as a failed migration Job?
No, though both can abort the same upgrade. --timeout bounds how long Helm waits for the whole release, migration Job and every workload's rollout together, before it gives up and reports a timeout. dapp.migrator.timeout (rendered as the Job's activeDeadlineSeconds) bounds only the migration Job itself. A migration that finishes at second 590 of its own 600-second budget can still exceed a --timeout sized for the rollout alone.
Is it safe to remove the previous encryption master password as soon as the migration Job finishes?
Yes for the local secrets, the KYC data and the transaction code secrets in the live database, once that Job has succeeded. The rotation does not re-seal RPC endpoint credentials, beneficial owner declarations, held administrator changes or participant import input, and the guard below does not count them. Keep the previous password until every backup you may restore has aged out, because a restore from an older backup brings back rows sealed under it. Rotation is one of the migration Job's required boot steps, not a separate job, so a row that fails to rotate fails the step, and a failed required step fails the Job. A migration Job that exited successfully has already reported a clean rotation.
The step logs four summary lines, Encrypted secret rotation summary, KYC template values rotation summary, Wallet authenticator secret rotation summary and KYC encryption rotation summary, each with scanned, rotated, skipped and failed counts. A skipped row is already stored under the current key. Check that failed is zero.
When ENCRYPTION_ is empty, the step checks that no data is still sealed under the previous password. When data remains, the step fails the Job with a count of the secret rows, KYC template values, wallet authenticator secrets and KYC objects still under the old key. That guard catches a premature removal at the next upgrade. The guard cannot recover a row sealed under a master password that nobody holds. That row stays unreadable. Encryption at rest covers the two-step sequence.