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.
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 Configurations → Clusters & 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:
From Deployment History (only after deployment)
From App Details (only after deployment)
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
From Build History
From Deployment History
From App Details
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).
Click the edit option.
Use the (-) icon to strike off the label. This icon is available on the left-side of a label.
Click Save.
Hard-Delete Labels
This action deletes the label permanently and makes it available for reuse in same/other image of the given application.
Click the edit option.
Use the (x) icon to permanently remove the label. This icon is available on the right-side of a label.
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:
Click the edit option.
Empty the content of an existing comment.
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