-
Feature Request
-
Resolution: Done
-
Normal
-
None
-
None
-
False
-
False
-
Undefined
-
-
-
The only supported option for tag pruning is revisions per tag.
--keep-tag-revisions=<N> For each imagestream, keep up to at most N image revisions per tag (default 3).
This RFE is to request image pruning by imagestreamtag per imagestream.
--keep-image-tags=<N> For each imagestream, keep up to at most N imagestreamtags
This will allow pruning, to keep N imagestreamtags per imagestream (latest N). This is more in line with pruning options of other registries, and does not require custom tagging for the OpenShift image registry in order to support keep-tag-revisions.
1. Proposed title of this feature request
OpenShift Registry - Add support for image pruning by imagestreamtag
2. Who is the customer behind the request?
Account name: (Acct. #772855 )
CSM customer: yes (Edward Lee <elee@redhat.com>)
TAM customer: yes (Jooho Lee <jlee@redhat.com>)
Strategic Customer: yes
3. What is the nature and description of the request?
Add an option to prune by image stream tags. For each imagestream, keep up to at most N imagestreamtags, all pruned imagestreamtags should have all unique images pruned from the registry. The suggested flag is --keep-istags=<N> or --keep-imagestream-tags=<N> or --keep-image-tags=<N>
4. What business requirements do you have around this request?
ImageStreamTags & images build up when unique ImageStreamTag is used for every unique image.
e.g.
ImageStreamTag: containerimage:1.0
ImageStreamTag: containerimage:1.1
ImageStreamTag: containerimage:1.2
ImageStreamTag: containerimage:1.3
ImageStreamTag: containerimage:1.4
ImageStreamTag: containerimage:1.5
ImageStreamTag: containerimage:1.6
Each ImageStreamTag contains 1 image tag referencing a unique image for that image version. Our goal is to keep the latest 3 versions.
Using the supplied image registry pruner, when using --keep-tag-revisions=3 all ImageStreamTags and images will be kept because there is only 1 revision in each ImageStreamTag.
containers:
- args:
- adm
- prune
- images
- --certificate-authority=/var/run/configmaps/serviceca/service-ca.crt
- --keep-tag-revisions=3
- --keep-younger-than=60m
- --prune-registry=true
- --confirm=true
5. How would you like to achieve this? (List the functional requirements here)
Add an option to the image pruner to allow to prune using latest N ImageStreamTags. It would follow the same conditions listed in the docs.
https://docs.openshift.com/container-platform/4.5/applications/pruning-objects.html#pruning-images-conditions_pruning-objects
6. For each functional requirement listed in question 5, specify how Red Hat can test to confirm the requirement is successfully implemented.
Run the pruner using the new option with the desired ImageStreamTag count. Make sure to have more than N ImageStreamTags in a particular ImageStreamTag. Make sure that anything falling under the conditions listed in
https://docs.openshift.com/container-platform/4.5/applications/pruning-objects.html#pruning-images-conditions_pruning-objects
are not pruned. All ImageStreamTags AND unique images in these ImageStreamTags not matching those conditions should be pruned and removed.
7. Is there already an existing RFE upstream or in Red Hat bugzilla?
Not that I am aware of.
8. Do you have any specific timeline dependencies?
No, the sooner the better for us.
9. Is the sales team involved in this request and do they have any additional input?
=> No but TAM was aware that Bell had this issue before.
10. List any affected packages or components you are aware of.
None I am aware of.
11. Would you able to assist in testing this functionality if implemented?
Yes we can.
~~~~~~