-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Our images are built in GitHub and not in OpenShift, so OpenShift retention policies don't work. We'll need to find another solution to automate pruning old images.
Purpose
- Avoid using too much space in image repository
- Avoid the need for manual intervention
Acceptance Criteria
- Figure out an automated solution to keep image repository usage down
Additional context
- Removing images is done by simply removing all the tags pointing to that image
- Challenges
- The tags are all stored in the tools namespace, so it is impossible to know if an older tag is for dev, test, or prod environment.
- If we try to keep only the most recent n images, they'll likely all be dev images
- If we try to retain images by date, we may accidentally remove the current prod image, since prod is not deployed often
- The current image tag for an environment can be found by looking in the deployment configs.
- The tags are all stored in the tools namespace, so it is impossible to know if an older tag is for dev, test, or prod environment.
- My most recent thoughts on how to do this would be to:
- Use an OpenShift cronjob
- Remove based on date
- Have an extra check for the currently deployed images for each environment and make sure to keep those
Reactions are currently unavailable