Tag Retention Logic

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

Docker, OCI, and Helm OCI local repositories include the ability to define repository-specific retention policies using the Max Unique Tags and Tag Retention fields. These fields allow you to control how Artifactory behaves when pushing new images and tags, and how it deals with tag overwriting.

In this article, learn how each field works and the implications when both settings are active together.

Important

Before version 7.75.3, the tag retention logic applied only to the tag entities themselves, but not to their layers or blobs. This meant that when a manifest exceeded the limits and was deleted, Artifactory continued to store its nested images, layers, and blobs, although their reference tag was removed. This led to unnecessary utilization of storage.

"Tag retention logic" refers to two fields that are available in Docker, OCI, and Helm OCI local repository settings when creating or editing a repository:

tag_retention_logic.png

By default, Max Unique Tags is set to zero (0) and Tag Retention is set to one (1), which means that they are inactive. With these default values, Artifactory allows uploading an unlimited number of unique tags and does not save previous overwrites of existing tags. However, this behavior applies specifically when overriding a manifest file. When overriding a list manifest, there are two options:

  • Only the list manifest is overwritten, the associated sub-manifests remain unchanged (default behavior).

  • Both the list manifest and associated sub-manifests are overwritten. To use this option, set the system property artifactory.docker.complete.manifest.override.enabled = true.

When entering a higher limit value, these fields become active and apply FIFO (first in, first out) logic, meaning that the oldest tag is removed when the number of tags or overwrites exceeds the defined limits.