Skip to main content
This guide walks you through upgrading your Midaz Helm deployment to the latest version (v5.x.x). You’ll find a quick start for experienced operators, followed by migration paths from older versions, detailed breaking changes, and post-upgrade checks.
Need a refresher on installing Midaz with Helm? Check the Using Helm guide in Deployment strategies before starting your upgrade.

Quick Start


1. Check the prerequisites

  • Helm v3.8+ installed and available (helm version).
  • Kubernetes v1.20+ cluster running.
  • Backup your existing installation.

2. Identify your current version

helm list -n midaz

3. Run the upgrade command

helm upgrade midaz oci://registry-1.docker.io/lerianstudio/midaz-helm --version 5.x.x -n midaz

4. Verify the upgrade

helm list -n midaz
kubectl get pods -n midaz

Version Compatibility


Componentv3.xv4.xv5.x
Kubernetes1.20+1.20+1.20+
Helm3.8+3.8+3.8+
PostgreSQL13+13+13+
MongoDB4.4+4.4+4.4+
Valkey7.x7.x7.x

Choose your migration path


Select your current Helm chart version to see the relevant migration steps:

Migrating from v4.x to v5.x

Pre-upgrade checklist

1
Backup existing Helm releases:
helm get values -n midaz midaz > midaz-v4-backup.yaml
2
Decision required: Choose your deployment strategy (Ledger service or legacy Onboarding/Transaction).
3
If migrating to Ledger service, prepare new secrets with module-specific prefixes.
4
Schedule a maintenance window.

Breaking changes in v5.x

New Ledger service available

Starting from version 5.0, the Ledger service is available (ledger.enabled: false by default). When enabled, this service combines the functionality of both onboarding and transaction modules into a single deployment.
The separate onboarding and transaction services will become legacy in a future release. The unified Ledger service will become mandatory. We strongly recommend planning your migration to the Ledger service.
Default values:
Settingv4.x (before)v5.x (after)
ledger.enabledN/Afalse
onboarding.enabledtruetrue (auto-disabled when ledger is enabled)
transaction.enabledtruetrue (auto-disabled when ledger is enabled)
Impact when enabling Ledger:
  • The midaz-onboarding and midaz-transaction deployments will be removed.
  • A new midaz-ledger deployment will be created.
  • Ingresses will automatically redirect to the Ledger service (DNS compatibility maintained).
  • Environment variables and secrets structure changes (module-specific prefixes).

App version bump

Midaz has been bumped to v3.5.1.
Check the app changelog for the complete list of changes.

Migration options

Option 1: Keep using Onboarding and Transaction (gradual migration)

Add the following to your values override to maintain the current behavior:
ledger:
  enabled: false

onboarding:
  enabled: true

transaction:
  enabled: true
This allows you to upgrade the chart version without changing your infrastructure.

Option 2: Run all services simultaneously (testing/migration period)

Use the hidden migration.allowAllServices flag to run all three services during the migration:
ledger:
  enabled: true

onboarding:
  enabled: true

transaction:
  enabled: true

migration:
  allowAllServices: true
This mode is intended for testing and migration only. Do not use in production long-term.
Accept the new architecture and migrate to the unified Ledger service:
1
Before upgrading: Ensure your databases are ready (same databases, new environment variable names).
2
Update secrets: Create new secrets with module-specific prefixes (see Ledger Configuration Reference below).
3
Upgrade: Run helm upgrade with the new chart version.
4
Verify: Check that the Ledger service is healthy and ingresses are working.
ledger:
  enabled: true

onboarding:
  enabled: false

transaction:
  enabled: false

New features in v5.x

Unified Ledger service

A new Ledger service that combines onboarding and transaction modules into a single deployment.Key characteristics:
  • Single HTTP endpoint (port 3000 by default)
  • Separate database configurations for each module
  • Shared Redis and RabbitMQ connections
  • New Balance Sync Worker for background processing
New environment variables:
# Balance Sync Worker
BALANCE_SYNC_WORKER_ENABLED: "false"
BALANCE_SYNC_MAX_WORKERS: "5"

Ingress redirection to Ledger

When Ledger is enabled, existing ingresses automatically redirect traffic to the Ledger service, maintaining DNS compatibility.
ledger.enabledmigration.allowAllServicesonboarding ingress targettransaction ingress target
falsefalse (default)midaz-onboardingmidaz-transaction
truefalse (default)midaz-ledgermidaz-ledger
truetruemidaz-onboardingmidaz-transaction

CRM service integration

The CRM service is now available as an integrated component, moving from midaz-plugins to midaz namespace.
For more details, refer to the CRM Documentation.
Migration from plugin-crm:
1
Deploy the new CRM in the midaz namespace:
crm:
  enabled: true
  configmap:
    MONGO_HOST: "midaz-mongodb"
    MONGO_NAME: "crm"
2
Migrate your data from the old MongoDB to the new one (if using separate databases).
3
Update your ingress/DNS to point to the new CRM service.
4
Remove the old plugin-crm release from midaz-plugins namespace.

Upgrade command

helm upgrade midaz oci://registry-1.docker.io/lerianstudio/midaz-helm --version 5.x.x -n midaz

Rollback procedure

# List release history
helm history midaz -n midaz

# Rollback to previous version
helm rollback midaz <REVISION> -n midaz

# Or explicitly disable ledger
helm upgrade midaz oci://registry-1.docker.io/lerianstudio/midaz-helm \
  --set ledger.enabled=false \
  --set onboarding.enabled=true \
  --set transaction.enabled=true \
  -n midaz

Common issues

Ledger service fails to start
  • Verify that all module-specific environment variables and secrets are configured with the new prefixes (DB_ONBOARDING_*, DB_TRANSACTION_*, etc.).
Ingress not routing to Ledger
  • Ensure ledger.enabled: true and migration.allowAllServices is not set to true.
Missing secrets after enabling Ledger
  • Create new secrets with module prefixes:
    • DB_ONBOARDING_PASSWORD instead of DB_PASSWORD
    • DB_TRANSACTION_PASSWORD instead of DB_PASSWORD
    • MONGO_ONBOARDING_PASSWORD instead of MONGO_PASSWORD
    • MONGO_TRANSACTION_PASSWORD instead of MONGO_PASSWORD

Ledger service configuration reference


The Ledger service uses module-specific database configurations:
ledger:
  enabled: false
  name: "ledger"
  replicaCount: 1

  image:
    repository: lerianstudio/midaz-ledger
    tag: ""  # Defaults to Chart.AppVersion
    pullPolicy: IfNotPresent

  configmap:
    # App Configuration
    ENV_NAME: "production"
    LOG_LEVEL: "debug"
    SERVER_PORT: "3000"
    SERVER_ADDRESS: ":3000"

    # Auth Configuration
    PLUGIN_AUTH_ENABLED: "false"
    PLUGIN_AUTH_HOST: ""

    # Accounting Configuration
    ACCOUNT_TYPE_VALIDATION: ""
    TRANSACTION_ROUTE_VALIDATION: ""

    # PostgreSQL - Onboarding Module
    DB_ONBOARDING_HOST: "midaz-postgresql-primary.midaz.svc.cluster.local."
    DB_ONBOARDING_USER: "midaz"
    DB_ONBOARDING_NAME: "onboarding"
    DB_ONBOARDING_PORT: "5432"
    DB_ONBOARDING_SSLMODE: "disable"
    DB_ONBOARDING_REPLICA_HOST: "midaz-postgresql-replication.midaz.svc.cluster.local."

    # PostgreSQL - Transaction Module
    DB_TRANSACTION_HOST: "midaz-postgresql-primary.midaz.svc.cluster.local."
    DB_TRANSACTION_USER: "midaz"
    DB_TRANSACTION_NAME: "transaction"
    DB_TRANSACTION_PORT: "5432"
    DB_TRANSACTION_SSLMODE: "disable"
    DB_TRANSACTION_REPLICA_HOST: "midaz-postgresql-replication.midaz.svc.cluster.local."

    # MongoDB - Onboarding Module
    MONGO_ONBOARDING_HOST: "midaz-mongodb.midaz.svc.cluster.local."
    MONGO_ONBOARDING_NAME: "onboarding"
    MONGO_ONBOARDING_USER: "midaz"
    MONGO_ONBOARDING_PORT: "27017"

    # MongoDB - Transaction Module
    MONGO_TRANSACTION_HOST: "midaz-mongodb.midaz.svc.cluster.local."
    MONGO_TRANSACTION_NAME: "transaction"
    MONGO_TRANSACTION_USER: "midaz"
    MONGO_TRANSACTION_PORT: "27017"

    # Redis (shared)
    REDIS_HOST: "midaz-valkey-primary.midaz.svc.cluster.local.:6379"

    # RabbitMQ (shared)
    RABBITMQ_HOST: "midaz-rabbitmq.midaz.svc.cluster.local."

    # Balance Sync Worker
    BALANCE_SYNC_WORKER_ENABLED: "false"
    BALANCE_SYNC_MAX_WORKERS: "5"

  secrets:
    # Onboarding Module
    DB_ONBOARDING_PASSWORD: ""
    DB_ONBOARDING_REPLICA_PASSWORD: ""
    MONGO_ONBOARDING_PASSWORD: ""

    # Transaction Module
    DB_TRANSACTION_PASSWORD: ""
    DB_TRANSACTION_REPLICA_PASSWORD: ""
    MONGO_TRANSACTION_PASSWORD: ""

    # Shared
    REDIS_PASSWORD: ""
    RABBITMQ_DEFAULT_PASS: ""
    RABBITMQ_CONSUMER_PASS: ""

External secrets support

ledger:
  useExistingSecret: true
  existingSecretName: <existing-secret-name>

Deployment flags reference

FlagDefaultDescription
ledger.enabledfalseEnables the unified Ledger service
onboarding.enabledtrueEnables onboarding (auto-disabled when ledger is enabled)
transaction.enabledtrueEnables transaction (auto-disabled when ledger is enabled)
migration.allowAllServicesfalseHidden flag to allow all services simultaneously

Production recommendation


We do not recommend using the Midaz Helm chart’s default dependencies (databases, cache, and message broker) in production environments. For production-grade deployments, follow our best practices to operate these dependencies with proper security, observability, backups, disaster recovery, and SLOs.

Post-upgrade verification


1. Check pod status

kubectl get pods -n midaz
All pods should be Running and READY.

2. Verify services

kubectl get svc -n midaz

3. Check the logs

# If using Ledger service (v5.x)
kubectl logs -n midaz deployment/midaz-ledger

# If using legacy services
kubectl logs -n midaz deployment/midaz-onboarding
kubectl logs -n midaz deployment/midaz-transaction

# Check RabbitMQ logs (important for v4.x+ upgrades)
kubectl logs -n midaz statefulset/midaz-rabbitmq

# Check CRM logs (if enabled)
kubectl logs -n midaz deployment/midaz-crm

4. Verify ingress routing (v5.x with Ledger)

kubectl get ingress -n midaz
kubectl describe ingress midaz-onboarding -n midaz
kubectl describe ingress midaz-transaction -n midaz

General rollback procedure


If you encounter issues after any upgrade:
# List release history
helm history midaz -n midaz

# Rollback to previous version
helm rollback midaz <REVISION> -n midaz

# Verify rollback
helm list -n midaz
kubectl get pods -n midaz