Variables and secrets
Weik.io 2026.2Set the values that differ between environments as variables and secrets, which routes use as Camel properties and each deployment gets at its next start. Product page · Video
Watch: Where the values live, 4:37
The video moves a value into a variable and an API key into a secret, and shows what reaches the running integration.
This part of the video couldn't be loaded.
On this page
Put a value in a variable or a secret when it differs between environments or may change without a new version. A route uses both as ordinary Camel properties, such as {{erp-url}} and {{erp-api-key}}, so the same version runs in devtest and production with each environment’s values.
Defaults and environment values#
A variable without an environment is the default, and one with an environment overrides it there:
apiVersion: weik.io/v1
kind: variable
metadata: { name: erp-url, project: finance }
spec: { value: https://erp-test.example.internal }apiVersion: weik.io/v1
kind: variable
metadata: { name: erp-url, project: finance, environment: production }
spec: { value: https://erp.example.internal }Each value is a separate document, because permissions are given per document. A developer allowed to edit devtest’s values never sees production’s.
$ weikio apply -f ./finance/variables/ -f ./finance/production/variables/ --env productionTarget: https://hub.example, project finance (from finance/project.yaml), environment production (--env)
variable finance/erp-url unchanged
variable production/finance/erp-url updated
variable production/finance/page-size created
2 deployments take the new value at their next start: production/finance/erp-invoice-export (running), production/finance/nightly-payroll (stopped)
restart the running one now with: weikio restart finance/erp-invoice-export --env productionSecrets#
A secret has the same shape as a variable, but you set its value with the CLI so it never sits in Git. On a terminal the command asks for the value without showing what you type:
$ weikio secret set finance/erp-api-key --env devtestTarget: https://hub.example, project finance (argument), environment devtest (--env)
Value:
secret finance/erp-api-key set for devtest (revision 4192)
1 deployment takes the new value at its next start:
devtest finance/erp-invoice-export (started)
To restart it now, run:
weikio secret set finance/erp-api-key --env devtest --restartIn a pipeline, pass the value on standard input:
$ printf '%s' "$ERP_PROD_KEY" | weikio secret set finance/erp-api-key --env production--from-file sets a value from a file, and --as-file stores a whole file, such as a certificate, up to 128 KiB.
Weik.io encrypts every secret with AES-256-GCM, under a master key that is kept in a file on each backend host and never in the message server or in a backup. An integration gets its secrets in a properties file that only the agent’s user can read, not on a command line.




Revealing a secret needs a separate permission. The audit log records every reveal.
When an environment has reveals switched off, a platform administrator is refused too:
$ weikio secret reveal finance/erp-api-key --env productionerror: Secret reveals aren't allowed in production.
Ask a platform admin to run:
weikio env set production --allow-secret-reveal=trueA deploy that needs a secret with no value in the environment fails before anything starts, and the error gives the command that sets the secret.
Which value wins#
When the same name has several values, the most specific one wins:
| This value | Wins over |
|---|---|
| A value set for the integration | The project’s value |
| A secret | A variable |
| An environment’s value | The default |
A key defined in the integration’s application.properties belongs to the integration. A project value doesn’t replace it, but a value set for that integration or a deployment override does. To see what a deployment gets and where each value comes from, add --resolved:
$ weikio get variables --env production --resolved --integration erp-invoice-exportNAME VALUE SOURCE
erp-url https://erp.example.internal variable:production
page-size 10 deployment-override
erp-api-key ******** secret:productionA value for one integration#
One integration can use ConnectionString for PostgreSQL while another uses it for MongoDB. Set each one’s value with --integration, and neither gets the other’s:
$ weikio secret set finance/ConnectionString --integration orders-postgres --env productionNames follow Camel’s spelling, so {{erp.url}} and {{AWS_ACCESS_KEY}} work. {{name:default}} and {{?name}} work as they do in Camel. When Weik.io has no value for the name, the first gets the default after the colon and the second gets nothing.
A changed value and restarts#
A changed variable or secret reaches each deployment that uses it at its next start. Weik.io restarts nothing by itself, because one shared value can feed many integrations, and an edit must not restart them all across production in the middle of a transfer. The command lists the deployments the value reaches:
$ weikio variable set finance/page-size 200Target: https://hub.example, project finance (argument), default environment (no --env)
variable finance/page-size updated (revision 4195)
2 deployments take the new value at their next start:
devtest finance/erp-invoice-export (started)
production finance/erp-invoice-export (started)
To restart them now, run:
weikio variable set finance/page-size 200 --restart--restart restarts them for you, and asks first when one of them runs in production:
$ weikio variable set finance/page-size 200 --restartTarget: https://hub.example, project finance (argument), default environment (no --env)
Deployments that will restart:
devtest finance/erp-invoice-export
production finance/erp-invoice-export
'production' is a production environment.
Continue? [y/N] y
variable finance/page-size updated (revision 4196)
deployment devtest/finance/erp-invoice-export restarted
deployment production/finance/erp-invoice-export restartedIn the admin UI, the integration’s Variables and secrets section lists the names its routes use and marks each one that still needs a value.