Skip to main content

Upgrading on Kubernetes (Helm)

Written by Aron Day

Upgrade with your existing values file and the new chart version.

Upgrade one major version at a time. Skipping major versions is not supported. If your target is more than one major version ahead, upgrade through each intervening major version in order. Verify that the installation is working after each upgrade before continuing.

When upgrading from v2 to v3, follow upgrading from v2 to v3 if you need to retain existing Blobstore data. That guide also explains how to start the Blobstore upgrade fresh when retaining the existing data is unnecessary.

PostgreSQL 18 is the only supported version for 3B v10 and later. This applies
to both in-cluster and external databases. If your deployment uses PostgreSQL 16,
contact Tines Support to plan a logical dump and restore before upgrading 3B.
Changing the Postgres image tag does not upgrade data on an existing volume.

helm upgrade 3b oci://oci.tines.com/3b/charts/3b \
  --version <NEW_VERSION> \
  --namespace 3b \
  -f values.yaml \
  --wait --timeout 30m

What happens:

  • The chart preserves the existing application secrets and creates credential-keys-pq once. The activation job validates that key, updates readers, then gives it to the API for new post-quantum Connector secret writes. Existing credentials keep using their original keys.

  • A one-time database migration job runs for the new version, then the services roll out.

  • nginx starts once Zero runs the new version. With zero.mode: split and nginx.hostPort or nginx.tls.hostPort, 3B is unavailable until every new view syncer is ready.

Keep credential-keys-pq with database backups. If restoring a backup that contains post-quantum credentials, restore that Secret before starting the services. Do not roll back to a version that cannot read post-quantum credentials after new ones have been written.

Do not use --atomic: an automatic rollback could restore old readers after post-quantum writes begin, or an older Zero that browsers running the new version cannot connect to.

Workflow storage upgrade

Upgrades from 6.x to 7.x use an automatic maintenance window for the shared
workflow snapshot upgrade. Upgrades from 7.x to 8.x and later roll without
stopping the application. You can skip intermediate 7.x releases. The chart stops the application services and waits for their pods
to exit before running the pending migrations, then starts the new release.
PostgreSQL, Blobstore, and their persistent volumes stay running.

Allow enough time for the historical backfill. For this upgrade, use
​--timeout 9h instead of --timeout 30m. The backfill can run for up to eight
hours, leaving time for draining and rollout. It skips replication throttling
while the application services are stopped. The actual outage depends on the
amount of workflow history and database performance. Later upgrades that use
the same workflow storage format do not repeat this maintenance window.

If draining or migration fails, the upgrade stops. Fix the reported error and
rerun the same upgrade. Do not manually restart an older application while the
migration is incomplete. Avoid automatic Helm rollback for this transition:
rolling back the chart does not undo database changes.

After legacy file copies are removed, rollback requires a release that reads
shared snapshots. Restoring an earlier release also requires restoring its
pre-upgrade database backup.

Tunnel networks

When tunnels use tunnel.gatewayHostPort, the gateway stops before its replacement starts. Upgrades interrupt tunnel connectivity, and requests still running after the 30-second shutdown window can fail. Exit nodes reconnect automatically once the replacement is ready; recovery time depends on image pulls, scheduling, and startup. Schedule a maintenance window for workloads that depend on tunnels.

With tunnel.gatewayNodePort, the chart starts a replacement before stopping the old gateway and allows up to 330 seconds for shutdown, including five minutes for active streams to drain. The cluster needs capacity for the extra gateway pod during the rollout. This reduces interruption but does not guarantee uninterrupted requests.

Helm preserves the gateway CA and authentication token across upgrades and while tunnels are disabled. Re-enabling tunnels reuses them. Do not delete tunnel-secrets: existing exit nodes trust the saved CA.

Special cases

  • Changed the license too? Follow applying a license so the tenant bootstrap job applies it to the tenant.

  • Custom worker sizing? No values change is needed, with your values file or with --reuse-values. The chart sizes each worker pod from worker.cpus, one CPU and one execution by default, as before. Each worker pod now requests about 4 GiB of memory, up from about 2.5 GiB, so check that your nodes have room before upgrading. worker.resources, sandboxd.resources, sandboxd.poolSize, sandboxd.runscSourceHash, and images.worker are retired and ignored. The upgrade’s notes list each one your values still hold, including ones that --reuse-values carries over from the previous chart’s defaults, and you can remove them. To run more executions per pod, see per-step resource limits.

  • Secrets managed outside Helm (secrets.generate: false): keep generate: false. The activation job creates credential-keys-pq; ensure your secret backup and reconciliation preserve it. The single-server installer also saves this keypair in its .env. The worker now reads Blobstore directly, so worker-secrets must include blobstore-auth-token, and worker pods don’t start without it. When upgrading from v7 to v8, keep gofer-control-secret in worker-secrets for v7 workers. git-service now always runs; if git-service-secrets is absent, a provisioning Job creates it with a random auth-token, and new API and git-service pods wait until it exists. Include it in your secret backups.

  • Something addresses the worker Service? It’s gone. Nothing in 3B used it, so remove any monitoring or network policy that targets it.

Recommendations

  • Take a database backup (and, if in-cluster, snapshot the persistent volumes) before upgrading production.

  • Upgrade a non-production stack first where you have one.

Did this answer your question?