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.


Adding Labels & Comments

Who Can Perform This Action?

You can add labels and comments from the following pages:

From Build & Deploy

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

From Build History

Figure 3: Adding Labels and Comments - 'Build History' Page

From Deployment History

Figure 4: Adding Labels and Comments - 'Deployment History' Page

From App Details

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

Deleting Labels & Comments

Soft-Delete Labels

Who Can Perform This Action?

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?

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.

Figure 7: Hard Deletion of a Label

Removing Comments

Who Can Perform This Action?

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.

Figure 8: Removing a Comment

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.

Figure 9: Application Groups - Filter by Image Label

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

Was this helpful?