Chapter 18. Container Entities
18.1. Configuring Automatic Tagging for Container Entities
Container object labels in OpenShift can be used to automatically create tags and tag categories in Red Hat CloudForms. This is done by mapping Red Hat CloudForms tags to existing OpenShift or Kubernetes labels.
Labels from OpenShift can be mapped to Red Hat CloudForms tags for the following container entities:
- Projects
- Nodes
- Routes
- Replicators
- Container services
- Pods
- Container builds
Tags automatically created from OpenShift labels are completely managed by the Red Hat CloudForms system and cannot be manually assigned or unassigned. Deleting a mapping rule from Red Hat CloudForms immediately deletes the resulting tags.
You can view a container entity’s OpenShift labels on the entity’s details page under Labels.
The following example shows how to configure tagging for a node, but the same steps can be used for mapping labels to tags on other container entities.
To configure automatic tagging on container entities using labels:
Note the key of the OpenShift label you want to map to a Red Hat CloudForms tag. OpenShift labels consist of two parts: a key and a value.
- Navigate to → → .
- Select a node to open its summary page.
Under Labels, note the label(s) to map to Red Hat CloudForms tag(s). Any OpenShift labels will list the key in the left column of the Labels table, and the value in the right column of the Labels table.
This node has six labels (key/value pairs) that were created in OpenShift and collected in the Red Hat CloudForms inventory:
NoteTo create an OpenShift label, see Developer CLI Operations in the OpenShift Container Platform CLI Reference guide. A new label added in OpenShift will only show up in Red Hat CloudForms after the next OpenShift provider refresh.
- Navigate to Configuration and select the region.
- Click the Map Tags tab.
Click Add to create a new mapping rule.
- Select a container entity to tag from the Entity list, or select <All> to tag all entities.
- Specify the key from the OpenShift label you noted earlier in the Label field.
Specify a Red Hat CloudForms tag category in Category to map the label to. If the tag category does not exist yet in Red Hat CloudForms, it will be created automatically.
- Click Add. The mapping will show in the table on the Map Tags tab.
Refresh the provider to complete the mapping:
- Navigate to → → .
- Select the provider to refresh.
-
Click
(Configuration), and then
(Refresh Items and Relationships).
The label will display on the entity’s summary page under Smart Management under Company Tags as <Category> : <value>.
Any container entity with the OpenShift zone label will be tagged automatically as category1 in Red Hat CloudForms. If the value for zone is south, for example, the entity will be tagged as category1 : south.
You can use these tags to create reports. See Monitoring, Alerts, and Reporting for details on creating reports.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.