OCI annotations can be applied to:
- Images
- Image indices
- Entries in image indices
Currently we only handle annotations on images themselves, and not on image indices or entries in imagine indices.
The expectation I'd have is that annotation on image index entries are almost always going to be a subset of the annotations on the image. org.opencontainers.image.ref.name is intended specifically for the index (See annotations.md But it's not clear that it's very useful in the context of an image index stored within the registry.
I'm less clear about what an annotation would used for an image index. It might represent an annotation that is common to all images in the image index.
The advantage of handling annotations only on images is it keeps searching simpler and more easily understood.