diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /doc/user/packages/dependency_proxy/index.md | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'doc/user/packages/dependency_proxy/index.md')
-rw-r--r-- | doc/user/packages/dependency_proxy/index.md | 66 |
1 files changed, 4 insertions, 62 deletions
diff --git a/doc/user/packages/dependency_proxy/index.md b/doc/user/packages/dependency_proxy/index.md index 52f5a1fcc0d..925a1b3e8e6 100644 --- a/doc/user/packages/dependency_proxy/index.md +++ b/doc/user/packages/dependency_proxy/index.md @@ -93,9 +93,8 @@ You can authenticate using: - A [personal access token](../../../user/profile/personal_access_tokens.md) with the scope set to `read_registry` and `write_registry`. - A [group deploy token](../../../user/project/deploy_tokens/index.md#group-deploy-token) with the scope set to `read_registry` and `write_registry`. -Users accessing the Dependency Proxy with a personal access token or username and password require -at least [Guest membership](../../permissions.md#group-members-permissions) -to the group they pull images from. +Users accessing the Dependency Proxy with a personal access token or username and password must +have at least the Guest role for the group they pull images from. #### SAML SSO @@ -210,65 +209,8 @@ from the GitLab server. ## Reduce storage usage -Blobs are kept forever on the GitLab server, and there is no hard limit on how much data can be -stored. - -### Using the API to clear the cache - -To reclaim disk space used by image blobs that are no longer needed, use -the [Dependency Proxy API](../../../api/dependency_proxy.md) to clear the entire -cache. - -If you clear the cache, the next time a pipeline runs it must pull an image or tag from Docker Hub. - -### Cleanup policies - -#### Enable cleanup policies from within GitLab - -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340777) in GitLab 14.6 - -You can enable an automatic time-to-live (TTL) policy for the Dependency Proxy from the user -interface. To do this, navigate to your group's **Settings > Packages & Registries > Dependency Proxy** -and enable the setting to automatically clear items from the cache after 90 days. - -#### Enable cleanup policies with GraphQL - -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/294187) in GitLab 14.4. - -The cleanup policy is a scheduled job you can use to clear cached images that are no longer used, -freeing up additional storage space. The policies use time-to-live (TTL) logic: - -- The number of days is configured. -- All cached dependency proxy files that have not been pulled in that many days are deleted. - -Use the [GraphQL API](../../../api/graphql/reference/index.md#mutationupdatedependencyproxyimagettlgrouppolicy) -to enable and configure cleanup policies: - -```graphql -mutation { - updateDependencyProxyImageTtlGroupPolicy(input: - { - groupPath: "<your-full-group-path>", - enabled: true, - ttl: 90 - } - ) { - dependencyProxyImageTtlPolicy { - enabled - ttl - } - errors - } -} -``` - -See the [Getting started with GraphQL](../../../api/graphql/getting_started.md) -guide to learn how to make GraphQL queries. - -When the policy is initially enabled, the default TTL setting is 90 days. Once enabled, stale -dependency proxy files are queued for deletion each day. Deletion may not occur right away due to -processing time. If the image is pulled after the cached files are marked as expired, the expired -files are ignored and new files are downloaded and cached from the external registry. +For information on reducing your storage use on the Dependency Proxy, see +[Reduce Dependency Proxy storage use](reduce_dependency_proxy_storage.md). ## Docker Hub rate limits and the Dependency Proxy |