zot
zot copied to clipboard
scrub: also create a media-type scrub method instead of just repo
Is your feature request related to a problem? Please describe.
As we add more media-types (now we also support manifest index which is a container of images), it needs to be scrubbed differently.
Describe the solution you'd like
foreach manifest in a repo: switch manifest.mediaType: case ImageManifest: // we already support this case ImageIndex: // unpack the manifest, iterate over each manifest and scrub them, this is NEW case ArtifactType: // something else, this is future
Related to issue https://github.com/project-zot/zot/issues/640
The image index case was covered in https://github.com/project-zot/zot/pull/1031. The artifact case is postponed for now.
Since the artifact manifest was removed, the only remaining requirement is to also take the image manifest 'Subject' into consideration when running scrub.
Done in https://github.com/project-zot/zot/pull/1845