Environment Variables
After filling in details regarding Access level, Resource Quota and Configurations, Secrets & PVC, you can enter and define the runtime environment variables also. Providing details of environment variables is not mandatory. It is completely optional to fill in details for this section.
This page allows users to define environment variables. But before knowing all this, let's read about environment variables first.
#
What are Runtime Environment Variables?Runtime environment variables are variables that are set and used by the operating system or runtime environment of a program while it is running. These variables are often used to customize the behaviour of the program or to provide information that the program needs to function properly.
Some examples of runtime environment variables include:
- PATH: A list of directories that the operating system searches when a program runs. This variable is used to find executable files and other resources that the program needs to run.
- HOME: The path to the home directory of the current user. This variable is often used by programs to store user-specific configuration files and other data.
#
Define Environment Variables as Raw Key-Value PairsIn case you don't have files in your Git Version Control where you can manage all system configurations, then you can use the product to manage configurations by defining Raw Key-Value Pairs (not recommended).
Here is how you can Define Environment Variables as Raw Key-Value Pairs.
- Click “Yes” to define Raw Key-Value Pairs details else click “No”.
- Enter Key details.
- Add value details.
- Click “Add Row” in order to specify more details regarding Key-Value pairs.
#
What are Raw Key-Value Pairs?Raw key-value pairs are a simple data structure used to store and organize data in a way that is easy to access and manipulate.
One common use of raw key-value pairs is in configuration files, where they are used to store settings and preferences for software applications. For example, a configuration file might include a key-value pair for the background colour of a program's user interface, with the key "background_color" and the value "blue".
#
Define Environment Variables from ConfigMapsA Service key is a unique code that is passed in an API request to identify the calling application or user. The product extracts value from the key of the ConfigMap file & Secret file and then assigns this value to the Service Key.
A ConfigMap key is a string that refers to a specific configuration item stored within a Kubernetes ConfigMap object and holds a specific configuration value.
Following these simple steps, you can define environment variables from ConfigMaps.
- Click “Yes” to define ConfigMap details else click “No”.
- Specify the ConfigMap Name to choose the desired ConfigMap file.
- Define Service Key. This is the key of the environment variable.
- Specify the ConfigMap key. The value from the specified key of the ConfigMap file is extracted and assigned to the Service Key.
- Click “Add Row” in order to specify more details regarding ConfigMaps.
- If you choose to “Upload file as env var”, then the complete ConfigMap file will get uploaded in the Service Key as an environment variable.
Read here to know more about ConfigMaps.
#
Define Environment Variables from SecretsA Secret Key is a piece of confidential information that is used to provide secure access to sensitive data.
Here’s how you can define environment variables from Secrets.
- Click “Yes” to define Secret details else click “No”.
- Select the Secret Name to choose the desired Secret file.
- Define Service Key. This is the key of the environment variable.
- Specify the Secret key. The value from the specified key of the Secret file is extracted and assigned to the Service Key.
- Click “Add Row” in order to specify more details regarding Secrets.
- If you choose to “Upload file as env var”, then the complete Secret file will get uploaded in the Service Key as an environment variable.