Applying Labels to Images

Introduction

Typically in a CI pipeline, you build container images, and the number of images gradually increases over a period of time. Devtron's image labels and comments feature helps you to mark and recall specific images from the repository by allowing you to add special instructions or notes to them.

For example:

  • You can label an image as non-prod to indicate that it is meant for 'Dev' or 'QA' environments, but not for production.

  • Add hotfix image only label to indicate a one-time patch on production.

  • Comments like This image is buggy and shouldn't be used for deployment to caution other users from deploying an unwanted image.

Figure 1: Labels and Comments

Such labels and comments will be visible only within Devtron, and will not propagate to your container registry (say Docker Hub), unlike custom image tag pattern. You may use it to simplify the management and selection of container images for deployment.

Tagging labels and comments are supported only for images in workflows with at least one production deployment pipeline. In Devtron, you can go to Global ConfigurationsClusters & Environments to identify a production environment by checking the 'Prod' label.


Adding Labels & Comments

Who Can Perform This Action?

Users need to have Build & deploy permission or above (along with access to the environment and application) to add labels and comments.

You can add labels and comments from the following pages:

You can add multiple labels to an image. but each label can be used only once 'per image, per application'. You may use it in an image of other application though. Refer Deleting Labels if you commit a mistake while adding labels.

From Build & Deploy

Figure 2: Adding Labels and Comments - 'Build & Deploy' Page

From Build History

From Deployment History

From App Details

Figure 5: Adding Labels and Comments - 'App Details' Page

Deleting Labels & Comments

Soft-Delete Labels

Who Can Perform This Action?

Users need to have Build & deploy permission or above (along with access to the environment and application) to perform soft deletion of labels.

This action marks the label as invalid but doesn't delete the label. Therefore, you can recover it again but you cannot reuse it for other image (unless it's a different application).

  1. Click the edit option.

  2. Use the (-) icon to strike off the label. This icon is available on the left-side of a label.

  3. Click Save.

Figure 6: Soft Deletion of a Label

Hard-Delete Labels

Who Can Perform This Action?

Users need to have super-admin permission to perform hard deletion of labels.

This action deletes the label permanently and makes it available for reuse in same/other image of the given application.

  1. Click the edit option.

  2. Use the (x) icon to permanently remove the label. This icon is available on the right-side of a label.

  3. Click Save.

Removing Comments

Who Can Perform This Action?

Users need to have Build & deploy permission or above (along with access to the environment and application) to remove comments.

If you wish to permanently remove a comment, do the following:

  1. Click the edit option.

  2. Empty the content of an existing comment.

  3. Click Save.


Extra Use Case

If you use Application Groups to deploy in bulk, image labels (if added) will be available as filters for you to quickly locate the container image.

This will be helpful in scenarios (say release package) where you wish to deploy multiple applications at once, and you have already labelled the intended images of the respective applications.

Last updated