Configuring Environment Variables
Configure environment variables for Connectware and Connectware agent components using the connectware and connectware-agent Helm charts.
Both the connectware and connectware-agent Helm charts let you set environment variables on containers using an env list of name and value pairs. Use this to pass runtime configuration that has no dedicated Helm value.
When to Use
Use environment variables when you need to:
Pass custom configuration flags not exposed as dedicated Helm values, such as debug options or feature toggles.
Set an application-specific configuration.
Before using env:, check whether a dedicated Helm value already exists for the setting you need. The charts filter out environment variables that are controlled through Helm values, so setting them via env: has no effect. Use env: only for settings that have no corresponding Helm value.
Configuration Values
The following Helm values control environment variables for each chart.
${COMPONENT_NAME}.env
Environment variables injected into the component's container.
protocolMapperAgentDefaults.env
Environment variables applied to all agent containers.
protocolMapperAgents[*].env
Environment variables applied to a specific agent's container only.
Setting Environment Variables
Set environment variables on each component individually. The connectware Helm chart does not provide a global env setting that applies to all Connectware components at once. To add environment variables to a component, set the env list under that component's configuration section.
The following example sets an environment variable on the authServer component:
# Note: 'authServer' is used as an example, but this configuration
# is applicable to any Connectware component.
authServer:
env:
- name: MY_CUSTOM_VAR
value: 'custom-value'The environment variable is injected only into the authServer container. All other components are unaffected.
Use this tab if you deploy the connectware-agent Helm chart on its own. If you deploy it as a subchart of the connectware Helm chart, see the connectware-agent Helm Chart (As Subchart) tab instead.
Setting Environment Variables for All Agents
To apply environment variables to all agents, add them to the protocolMapperAgentDefaults section of your values.yaml file:
protocolMapperAgentDefaults:
env:
- name: CYBUS_TRUST_ALL_CERTS
value: 'true'
protocolMapperAgents:
- name: bender-robots
- name: welder-robotsAll agents inherit these environment variables unless overridden at the per-agent level.
Setting Environment Variables for a Single Agent
To define environment variables for a specific agent, add the env list to that agent's entry in protocolMapperAgents:
protocolMapperAgents:
- name: bender-robots
env:
- name: CYBUS_TRUST_ALL_CERTS
value: 'true'
- name: CYBUS_LOG_LEVEL
value: debugThese environment variables apply only to the bender-robots agent and do not affect other agents in the same Helm release.
Unsetting Default Environment Variables for a Single Agent
If you have defined environment variables in protocolMapperAgentDefaults, you can remove them for a specific agent by setting env to an empty list ([]) in that agent's entry.
In the following example, bender-robots inherits the default environment variable, while welder-robots has its defaults cleared:
Use this tab if you deploy the connectware-agent Helm chart as a subchart of the connectware Helm chart. If you deploy it on its own, see the connectware-agent Helm Chart (Standalone) tab instead.
When deployed as a subchart, nest all connectware-agent values under the connectwareAgent key.
Setting Environment Variables for All Agents
To apply environment variables to all agents, set them under connectwareAgent.protocolMapperAgentDefaults:
All agents inherit these environment variables unless overridden at the per-agent level.
Setting Environment Variables for a Single Agent
To define environment variables for a specific agent, add the env list to that agent's entry under connectwareAgent.protocolMapperAgents:
These environment variables apply only to the welder-robots agent and do not affect other agents in the same Helm release.
Unsetting Default Environment Variables for a Single Agent
If you have defined environment variables in protocolMapperAgentDefaults, you can remove them for a specific agent by setting env to an empty list ([]) in that agent's entry.
In the following example, bender-robots inherits the default environment variable, while welder-robots has its defaults cleared:
Applying Configuration Changes
After editing your values.yaml file, apply the changes by running the helm upgrade command. For details, see Applying Helm Configuration Changes.
Last updated
Was this helpful?

