Help Center> ServiceStage> User Guide (ME-Abu Dhabi Region)> User Guide> Application O&M> Adding Labels for Application Component Instances
Updated on 2023-06-25 GMT+08:00

Adding Labels for Application Component Instances

Labels are key-value pairs and can be attached to workloads. Workload labels are often used for affinity and anti-affinity scheduling. You can add labels to multiple workloads or a specified workload.

You can manage the labels of stateless workloads, stateful workloads, and Daemon sets based on service requirements. This section uses Deployments as an example to describe how to manage labels.

In the following figure, three labels (release, env, and role) are defined for workload APP 1, APP 2, and APP 3. The values of these labels vary with workload.

  • APP 1: [release:alpha;env:development;role:frontend]
  • APP 2: [release:beta;env:testing;role:frontend]
  • APP 3: [release:alpha;env:production;role:backend]

If you set key to role and value to frontend when using workload scheduling or another function, APP 1 and APP 2 will be selected.

Figure 1 Label example

Procedure

  1. Log in to ServiceStage and choose Application Management > Application List to view all applications.
  2. Click an application. The Overview page is displayed.
  3. On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
  4. Click an application component. The Overview page is displayed.
  5. Click Manage Label.
  6. Click Add Label, set Key and Value, and click Save.

    • The key name must be unique.
    • Labels cannot be added to application component instances that are abnormal or deployed on VMs.