Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tag rentention policies more configurable and usable for different scenarios #20941

Open
tuxpeople opened this issue Sep 18, 2024 · 0 comments
Labels
kind/requirement New feature or idea on top of harbor

Comments

@tuxpeople
Copy link

Is your feature request related to a problem? Please describe.
We use tag retention policies to clean up projects from older images. However, we ran into multiple issues while trying to set this up which makes the feature useless in many situations.

Situation 1: Helm charts and container images share the same name. In this case, we can't use a policy like retain the most recently pushed 3 artifacts with tags matching ** because it does not differentiate between images and charts. If I push an image, followed by a chart and then later push two bugfix helm charts, this policy would delete the image, leaving only the helm charts.

Situation 2: We replicate images from another repository daily, matching a given pattern. If we change the pattern, new images get replicated but those not being replicated any longer are still in the project. I tried to clean them up using "last pushed" or "last pulled" policies, but the timestamps are not being updated when a replication runs. Otherwise, I would be able to cleanup those not replicated in the last 24hrs.

Situation 3: Similar to situation 2, but a little different. We use two Harbors, one "external" for get new images from outside and an "internal" one from where the images can be used. We have replication between them, but there is no way currently to get rid of the images on the internal one when the get deleted on the "external" Harbor.

Describe the solution you'd like

  • Allow user to differentiate between artifact types (charts, images, others) when creating policies,
  • Give users the possibility for creating policies based on the last time an artifact was being replicated.
@chlins chlins added the kind/requirement New feature or idea on top of harbor label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/requirement New feature or idea on top of harbor
Projects
None yet
Development

No branches or pull requests

2 participants