Skip to content

Label inspection & aggregation endpoint  #600

@shaded-enmity

Description

@shaded-enmity

Since we've gained the ability to store arbitrary metadata in the images in the form of labels, I think that it would be nice if we could query the labels without actually downloading neither the image nor the manifest.

/v2/library/repo/labels/?api_version&base

The endpoint would return aggregate label information from all the tags in the given repository:

[
{
     "tag": "latest",
     "digest": "......",
     "labels": {
         "api_version": "v159",
         "base": "centos"
     }
},
{
     "tag": "stable",
     "digest": "......",
     "labels": {
         "api_version": "v134",
         "base": "centos"
}
]

With that I can figure out which image I want to pull without downloading anything (disregarding the inherent race condition in fetch tag list x fetch manifest N ).
For example I can fetch all aggregate VERSION labels and figure out if my local image is up to date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions