Variables and secrets
Weik.io 2026.2Set the values that differ between environments as variables and secrets, which a deployment's routes use as Camel properties from 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. A variable with an environment overrides the default 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 the value never goes into Git. On a terminal, enter the value at the Value: prompt, which hides 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. --as-file stores a whole file of up to 128 KiB, such as a certificate.
Weik.io encrypts every secret with AES-256-GCM under a master key. The key is kept in a file on each hub server 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 can’t reveal its secrets either:
$ 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. To set the secret, run the command in the error message.
Which value wins#
When a name has values at more than one level, 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 property 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 so that 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, {{name:default}} gets the default after the colon, but {{?name}} 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 reach many integrations across production. weikio variable set 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. When one of them runs in production, you confirm first:
$ 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.
Delete a variable#
weikio delete variable deletes a variable’s default, or with --env one environment’s override. Before you confirm, the command lists the deployments and the API versions that use the variable. --dry-run lists them without deleting anything.
A known issue in 2026.2.4: before you confirm, Delete variable in the admin UI lists no API deployments, so you can delete a variable that a production API uses and break that API. Before you delete a variable in the admin UI, run
weikio delete variablewith--dry-runto list the API versions that use it. You can also hover over the variable’s name in the project’s Variables and secrets, under Settings › Projects, and look for API versions afterUses this value.