Managing Configuration Items
Configuration items (ConfigMaps) are user-defined resources that store application configurations. They can be used as files or environment variables in applications.
Configuration items allow you to decouple configuration files from images to enhance the portability of applications.
Benefits of configuration items:
- Manage configurations of different environments and services.
- Deploy applications in different environments. You can maintain configuration files in multiple versions, which makes it easy to update and roll back applications.
- Quickly import configurations in the form of files to containers.
This section describes how to create, delete, view, and update configuration items.
Prerequisites
- A CCE cluster has been bound to the environment. For details, see Binding a CCE Cluster.
- The namespace to which the configuration item belongs has been created. For details, see Creating a Namespace.
Creating a Configuration Item
- Log in to ServiceStage.
- On the Environment Management page, click the target environment.
- In the Resource Settings area, choose Cloud Container Engine from Compute.
- Click Configuration Item > Create Configuration Item.
ServiceStage allows you to create configuration items in Visualization or YAML mode.
- Method 1: Visualization
Configure the configuration item by referring to Table 1. Parameters marked with an asterisk (*) are mandatory.
Table 1 Parameters for creating a configuration item in visualization mode Parameter
Description
*Configuration Name
Name of the configuration item, which must be unique in a namespace.
*Cluster
Cluster where the configuration item will be used.
*Namespace
Namespace to which the configuration item belongs. The default value is default.
Description
Description of the configuration item.
Configuration Data
Configuration data to be used in applications or used to store configuration data. Key indicates a file name, and Value indicates the content in the file.
- Click Add Data.
- Enter the key and value.
Configuration Labels
Labels that you want to attach to various objects (such as applications, nodes, and services) in the form of key-value pairs.
Labels define the identifiable attributes of these objects and are used to manage and select the objects.
- Click Add Label.
- Enter the key and value.
Figure 1 Setting configuration item parameters in Visualization mode
- Method 2: YAML
To create a configuration item by uploading a file, ensure that a configuration item description file has been created. ServiceStage supports files in YAML format. For details, see Configuration Item Requirements.
- Select a cluster from the Cluster drop-down list.
- (Optional) Click Upload File and select the ConfigMap resource file created locally. Click Open and wait until the upload is successful.
- Write or modify the ConfigMap resource file in Orchestration content.
Figure 2 Setting configuration item parameters in YAML mode
- Method 1: Visualization
- Click Create Configuration Item.
After the configuration item is created, it is displayed in the configuration item list.
Follow-Up Operations
After a configuration item is created, you can search for, view, update, and delete the configuration item by referring to Table 2.
- Deleted items cannot be restored. Exercise caution when performing this operation.
- The configuration item list contains system configuration items, which can only be viewed and cannot be modified or deleted.
Operation |
Description |
---|---|
Searching for a configuration item |
|
Viewing a configuration item |
Click Show YAML in the Operation column of the target configuration item to view the content of the YAML file of the configuration item. |
Modifying a configuration item |
|
Deleting a configuration item |
|
Deleting configuration items in batches |
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot