diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 00:10:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 00:10:07 +0300 |
commit | 0ea2d99b0bf43878a889cc6aa91443245d05356d (patch) | |
tree | dcaed8ad9d3a4fdf0efe9b9c4dd5b59b6360a51b /doc/user/packages | |
parent | f602da84d10c36889714e46040f26cdfef5dce60 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/packages')
-rw-r--r-- | doc/user/packages/package_registry/reduce_package_registry_storage.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/user/packages/package_registry/reduce_package_registry_storage.md b/doc/user/packages/package_registry/reduce_package_registry_storage.md index ed4ef1665bc..4a03bd9e8a0 100644 --- a/doc/user/packages/package_registry/reduce_package_registry_storage.md +++ b/doc/user/packages/package_registry/reduce_package_registry_storage.md @@ -50,3 +50,39 @@ To delete package files in the UI, from your group or project: 1. Expand the ellipsis and select **Delete file**. The package files are permanently deleted. + +## Cleanup policy + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/346153) in GitLab 15.2. + +Depending on the number of packages to remove, the process of manually deleting the packages can take a long time to finish. +A cleanup policy defines a set of rules that, applied to a project, defines which package files you can automatically delete. + +### Enable the cleanup policy + +By default, the packages cleanup policy is disabled. To enable it: + +1. Go to your project **Settings > Packages & Registries**. +1. Expand **Manage storage used by package assets**. +1. Set the rules appropriately. + +NOTE: +To access these project settings, you must be at least a maintainer on the related project. + +### Available rules + +- `Number of duplicated assets to keep`. The number of duplicated assets to keep. Some package formats allow you + to upload more than one copy of an asset. You can limit the number of duplicated assets to keep and automatically + delete the oldest files once the limit is reached. + +### Set cleanup limits to conserve resources + +A background process executes the package-cleanup policies. This process can take a long time to finish and consumes +server resources while it is running. + +You can use the following setting to limit the number of cleanup workers: + +- `package_registry_cleanup_policies_worker_capacity`: the maximum number of cleanup workers running concurrently. + This number must be greater than or equal to `0`. + We recommend starting with a low number and increasing it after monitoring the resources used by the background workers. + To remove all workers and not execute the cleanup policies, set this to `0`. The default value is `2`. |