Setting Application Environment Variables
Environment variables are set in the container running environment and can be modified after application component deployment, ensuring the flexibility of applications.
Adding Environment Variables
- During application component deployment, choose Advanced Settings > Component Configurations on the Configure Component page.
- Click Add Environment Variable. Currently, three types are supported.
Table 1 Environment variable types Environment Variable Type
Procedure
Add manually
Set the environment variable name and variable value.
Add from ConfigMap
You need to create a configuration item.
- Set the type to Add from ConfigMap.
- Enter Variable Name.
- Select a ConfigMap from the Variable/Variable Reference drop-down list.
Add from secret
You need to create a secret.
- Set the type to Add from secret.
- Enter Variable Name.
- Select a secret from the Variable/Variable Reference drop-down list.
Importing From a File
- When deploying an application component, expand Advanced Settings > Component Configurations on the Configure Component page.
- Click Import and select a local file to upload.
The imported file must be a key-value pair mapping file in JSON or YAML format. Example: {"key1": "value1", "key2": "value2"...}.
Last Article: Performing Advanced Settings for an Application
Next Article: Configuring the Lifecycle of an Application
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.