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

Introduce v1alpha3 and make the garbage collection TTL configurable #144

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

ialidzhikov
Copy link
Member

@ialidzhikov ialidzhikov commented Feb 8, 2024

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:
This PR introduces v1alpha3 to make the garbage collection TTL configurable. With #138 we upgraded to v3.0.0-alpha.1 of distribution/distribution. In that version the proxy's garbage collection TTL is configurable. In prior versions it was hard-coded to 168h (7 days). Making the TTL configurable is needed to increase registry-cache's efficiency. Otherwise, every blob expires and gets deleted in 7 days, then it has to pulled again.

Q: Why we need to introduce v1alpha3 to make the TTL configurable?
A: v1alpha3 replaces the current garbageCollection.enabled field with garbageCollection.ttl. We were so far abusing with the storage.delete.enabled config option of the Distribution project to control garbage collection. With the ttl field, the GC can be natively disabled by setting ttl=0. Having only the ttl field also keeps the API simple and in sync with what the Distribution project exposes as config options for the proxy.

Which issue(s) this PR fixes:
Part of #3

Special notes for your reviewer:
N/A

Release note:

The registry-cache extension introduces a new API version `registry.extensions.gardener.cloud/v1alpha3`. In the new API version the garbage collection TTL is configurable. Previously, the TTL was hard-coded internally in the Distribution project to `168h` (7 days). In the latest version (3.0.0) of Distribution project it is configurable.
The `registry.extensions.gardener.cloud/v1alpha2`API version is deprecated. See [Migration from `v1alpha2` to `v1alpha3`](https://github.com/gardener/gardener-extension-registry-cache/blob/v0.7.0/docs/usage/migration-from-v1alpha2-to-v1alpha3.md) on how to migrate from `registry.extensions.gardener.cloud/v1alpha2` to `registry.extensions.gardener.cloud/v1alpha3`.

@gardener-prow gardener-prow bot added the kind/enhancement Enhancement, improvement, extension label Feb 8, 2024
@gardener-prow gardener-prow bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 8, 2024
@ialidzhikov
Copy link
Member Author

/hold
until v0.6.0 is released

@gardener-prow gardener-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 8, 2024
@ialidzhikov
Copy link
Member Author

/hold cancel
v0.6.0 is released

@gardener-prow gardener-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2024
@dimitar-kostadinov dimitar-kostadinov self-assigned this Feb 16, 2024
Copy link
Contributor

@dimitar-kostadinov dimitar-kostadinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2024
Copy link
Contributor

gardener-prow bot commented Feb 16, 2024

LGTM label has been added.

Git tree hash: 9504debe6e2bc9deb67db1f54d72c8b24c5587a1

@gardener-prow gardener-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2024
Copy link
Contributor

@dimitar-kostadinov dimitar-kostadinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2024
Copy link
Contributor

gardener-prow bot commented Feb 16, 2024

LGTM label has been added.

Git tree hash: e83ff2c2d7535722df396a42d59538dd2c7cb43f

Copy link
Contributor

gardener-prow bot commented Feb 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dimitar-kostadinov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 16, 2024
@gardener-prow gardener-prow bot merged commit af99675 into gardener:main Feb 16, 2024
6 checks passed
@ialidzhikov ialidzhikov deleted the enh/configurable-ttl branch February 20, 2024 09:56
@JordanJordanov JordanJordanov added the area/ipcei IPCEI (Important Project of Common European Interest) label May 21, 2024
@JordanJordanov JordanJordanov added the ipcei/registry-cache-extension Registry Cache Extension label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ipcei IPCEI (Important Project of Common European Interest) cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. ipcei/registry-cache-extension Registry Cache Extension kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants