Before you start
Make sure that you have these items:
- A Kubernetes cluster and Helm.
- A PostgreSQL database for the Courier.
- The address of your Access Manager.
- Your Lerian license key and organization ID.
- The SPB channel settings that JD gave your institution.
The four roles
One binary carries the four roles. The variable
COURIER_ROLES selects the roles of a process. It has no default: a process without it does not start. The chart sets it for each deployment, and it refuses a value in config.
Run
spb-consumer as exactly one replica. A read from the JD queue removes the message, so the consumer is a single writer. The chart refuses to render more than one replica. A process that combines spb-consumer with another role stops at boot with the code JDC-0314.
Ports
The chart derives both variables from
ports.http and ports.soap. Every role answers the probes on the HTTP port: /health for liveness, /readyz for readiness, and /version for the build.
Install with Helm
The chart is
oci://ghcr.io/lerianstudio/br-jd-courier-helm. Read its versions before you pin one:
-
Create the Secret that every role reads. The chart does not create it.
Put
LICENSE_KEY,POSTGRES_PASSWORD,DATABASE_URLand, in single-tenant mode,JD_PASSWORDin a Kubernetes Secret that you create. The chart refuses these keys in itsconfigvalues. -
Write your values file. Put the non-secret variables under
config. The chart puts them in one ConfigMap that every role reads. -
Install the chart:
Environment variables
This section lists the variables of the Courier. For the datastore, multi-tenancy, telemetry, and authentication variables that every Lerian service shares, see BYOC configuration essentials.
In the tables below, the Default / Required column shows the default value. Required marks the variables that you must set.
— means no default. 🔒 marks a secret.Service
JD SPB channel
The two SPB roles read these variables.JD_LEGACY_CODE, JD_USER_CODE and JD_PASSWORD are the JD credentials you already hold (up to 10, 10 and 20 characters). In production, use https for JD_BASE_URL.
SOAP interface
Thespb-sender role reads these variables.
In production, give
spb-sender a TLS certificate and key (SOAP_TLS_CERT_FILE, SOAP_TLS_KEY_FILE), or set SOAP_TLS_TERMINATED_UPSTREAM when TLS ends before the Courier. The minimum TLS version is 1.2.
Pix
PIX_VENDOR_SUBJECTS lists the JD identities that can call pix-ingress. The Courier refuses every other caller, engines included.
The Courier reads each engine’s client ID and secret from AWS Secrets Manager, in AWS_REGION. Store them there before you register the engine. Without access to AWS Secrets Manager, the Courier keeps the engine’s Pix messages and does not deliver them.
Store each engine’s secret under tenants/{ENVIRONMENT_NAME}/{tenantId}/jd-courier/external/pix-engine-{engineId}/credentials/versions/{versionId}. pixDelivery.credentialRef must point to that secret. The Courier does not deliver to the engine when the reference points to any other path. The secret is a JSON object with the fields clientId and clientSecret. {versionId} is a lowercase UUID. In single-tenant mode, {tenantId} is the tenant ID of the Courier’s active Pix channel.
License
License behavior
The Courier checks the license at boot. Do not restart a pod while the license is not valid: the pod does not start until you fix the license. While the process runs, the Courier checks the license again every 6 hours. When the license becomes revoked, the process stays up:
- The operator API and the engine API answer
503 JDC-0902. - The Pix address and the SOAP interface answer
503. - The
spb-consumerrole stops reading from JD.
/readyz probe reports the license state. While the license is revoked, the Courier checks it again after 1 minute, and the interval doubles up to 15 minutes. At the first valid answer, the Courier serves again with no restart.
Multi-tenant mode
Multi-tenant mode lets one deployment of the Courier serve more than one client. Lerian Cloud runs the Courier in this mode, and Lerian operates the deployment. The other sections of this page describe a single-tenant deployment.
MULTI_TENANT_ENABLED=true turns the mode on. For the other MULTI_TENANT_* variables, see BYOC configuration essentials and Multi-tenancy.
In multi-tenant mode, the operator API, the engine API and the Pix ingress take the tenant from the caller’s verified token. The SOAP address takes the tenant from the channel credential.
What changes from single-tenant
- The
spb-consumerrole still runs as exactly one replica. It reads from JD for each tenant that has an active SPB channel. - The
spb-consumerrole reads the tenant list again every 30 seconds (SPB_TENANT_REFRESH_SEC). When the database of a tenant does not answer, the role skips that tenant for that pass. The other tenants continue. - Reconciliation runs one cycle for each tenant and rail.
- The
pix-ingressrole requiresSYSTEMPLANE_ENABLED=true. Without it, the process does not start. - The chart does not run the migrations job. Set
migrations.enabled=false: the chart refuses to render the job in this mode. Apply the migrations of each tenant through Tenant Manager.
JD_BASE_URL, JD_SOAP_PATH, JD_LEGACY_CODE, JD_USER_CODE and JD_PASSWORD. It reads each tenant’s JD address and JD credential from AWS Secrets Manager.
In multi-tenant mode, the Courier ignores PIX_VENDOR_SUBJECTS. The runtime configuration key jd-courier.pix/vendor_subjects lists the JD identities for each tenant. The Courier answers 503 to every JD Pix call for a tenant with no entry.
In multi-tenant mode, the Courier does not start with PLUGIN_AUTH_ENABLED=false. Put MULTI_TENANT_SERVICE_API_KEY and MULTI_TENANT_REDIS_PASSWORD in the Kubernetes Secret.
Who configures what on Lerian Cloud
- Lerian configures the deployment: the environment variables, the runtime configuration, and the migrations of each tenant.
- Your operator uses the operator API as in a single-tenant deployment: the engines, the ownership map, the delivery modes, bypass, the retained messages, and reconciliation.
- Your engines use the engine API, the SOAP interface, and the Pix address as in a single-tenant deployment.

