-
Notifications
You must be signed in to change notification settings - Fork 150
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
feat: introduce retention policy support #3709
Draft
shreddedbacon
wants to merge
15
commits into
main
Choose a base branch
from
retention-policies
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,936
−83
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shreddedbacon
force-pushed
the
retention-policies
branch
from
April 15, 2024 01:50
ac1111f
to
27c10b4
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
from
May 10, 2024 01:53
27c10b4
to
7d58364
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
from
May 24, 2024 00:40
7d58364
to
6b70b89
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
from
July 8, 2024 01:03
6b70b89
to
ad20e12
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
2 times, most recently
from
August 18, 2024 22:59
cdd16b5
to
641862f
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
2 times, most recently
from
September 18, 2024 08:25
ebca482
to
d4fd21a
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
3 times, most recently
from
October 18, 2024 07:48
8949ac1
to
0d9b7cb
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
2 times, most recently
from
October 25, 2024 03:37
5916484
to
d2cbcf4
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
from
October 31, 2024 20:24
d2cbcf4
to
1cbb40d
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
from
November 19, 2024 04:38
1cbb40d
to
f5c6943
Compare
shreddedbacon
force-pushed
the
retention-policies
branch
from
December 12, 2024 08:20
ae17097
to
41b5925
Compare
…backup and storage history
…ale data when removed
shreddedbacon
force-pushed
the
retention-policies
branch
from
December 23, 2024 06:06
41b5925
to
9c35fd8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General Checklist
Database Migrations
Introducing retention policy support to Lagoon. This first iteration only contains Harbor and history based retention policy support.
Retention policy support allows platform owners to configure policies globally, organizationally, or directly on projects. Policy inheritance exists-ish, and a project will override organization, which will override global.
Harbor Policies
Harbor policies allow for retaining the Last Pulled number of images based on rules that can be defined. This allows platform owners to be able to write rules that could retain all images of a project for the last # pulled images. Or configure multiple rules based on doublestar pattern matching that Harbor uses to prune some images more aggressively than others.
Harbor policies are enforced when they are linked, unlinked, updated, or when a deployment reaches the final stages. It uses hooks on certain events, and then send messages to the remotes to inform their configured Harbor of any policy changes that are required.
This requires that the
remote-controller
be updated with support for receiving the retention policy payloadsHistory Policies
History policies allow for retaining the last X number of builds and tasks and associated files/logs for these. It is possible to configure this for
COUNT
,DAYS
,MONTHS
. This allows for platform owners to retain a small number of builds and tasks within an environment if they choose to.History policies are enforced whenever a new task or build is created.
See the README for more information about retention policies.