Injecting configuration items (ConfigMap) into a container allows them to be transformed into files within the container. This enables the application to read these files as configuration files, providing the flexibility to modify the application's configuration without the need to rebuild the image.
Inject configuration items
The following contents describe the procedure for different scenarios:
Create an application
Log on to the SAE console. In the left-side navigation pane, choose . On the page that appears, select a region in the top navigation bar and a namespace from the Namespace drop-down list, and then click Create Application.
After the Basic Information is specified on Create Application page, click Next: Advanced Settings.
Modify running applications
WarningAfter you redeploy an application, the application is restarted. To prevent unpredictable errors such as business interruptions, we recommend that you deploy applications during off-peak hours.
Log on to the SAE console. In the left-side navigation pane, choose . On the page that appears, select a region in the top navigation bar and a namespace from the Namespace drop-down list, and then click the desired application name.
On the Basic Information page of the application, click Deploy Application.
Modify stopped applications
Log on to the SAE console. In the left-side navigation pane, choose . On the page that appears, select a region in the top navigation bar and a namespace from the Namespace drop-down list, and then click the desired application name.
On the Basic Information page of the application, click Modify Application Configurations.
Expand the Configuration Management area and configure as needed.
Create configuration items
Before injecting configuration items, you must first create them. You can create configuration items in the application's Namespace or click Create Configuration Item (configmap) in the current area to create them in the Advanced Settings page. The created configuration items will be synchronized to the application's Namespace.
Click +Add to inject either a single key or all keys of a specific configuration item (ConfigMap) into the container, transforming them into files within the container. The value of the configuration item will serve as the file content, and you can customize the file's attach path.
When modifying configurations, first copy the original configuration file content from the container to your local machine. After making the changes, save them as the value of the configuration item (ConfigMap), and then follow the steps below to inject the configuration item into the container. To ensure the changes take effect, redeploy the application and click the refresh button next to the Configuration Item Name.
Inject a single key
Select the Configuration Item Name and the corresponding Key, and specify the Attach Path. The Attach Path is the absolute path in the container environment, including the file name. If the path does not exist, it will be created automatically. If a file with the same name already exists, the injected file will overwrite it. The injected file will be read-only within the container.

Inject all keys
Select the Configuration Item Name, choose All from the Key dropdown, and specify the Attach Path. The Attach Path is the absolute path in the container environment, excluding the file name and must not end with /. The injected file will use the key name as the file name. If the path does not exist, it will be created automatically. If a file with the same name already exists, the injected file will overwrite it. The injected file will be read-only within the container.
