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

Add collectible resources to metadata gc #6804

Merged
merged 2 commits into from
May 2, 2022

Conversation

dmcgowan
Copy link
Member

Adds a registration function to metadata which allows plugins to register resources to be garbage collected. These resources allow defining resources types which are ephemeral and stored outside the metadata plugin without extending it. The garbage collection of these resources will not fail the metadata gc process if their removal fails. These resources may be referenced by existing metadata store resources but may not be used to reference metadata store resources for the purpose of preventing garbage collection.

This is split out from my work on the new image transfer service which will use this for tracking progress streams. This could also be used in the implementation of a mount and network manager after the sandbox API is merged.

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Adds a registration function to metadata which allows plugins to
register resources to be garbage collected. These resources allow
defining resources types which are ephemeral and stored outside the
metadata plugin without extending it. The garbage collection of these
resources will not fail the metadata gc process if their removal fails.
These resources may be referenced by existing metadata store resources
but may not be used to reference metadata store resources for the purpose
of preventing garbage collection.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan force-pushed the metadata-collectible-resources branch from a0c02c7 to 8367f69 Compare April 13, 2022 01:59
@dmcgowan dmcgowan added this to the 1.7 milestone Apr 13, 2022
@dmcgowan dmcgowan added this to New in Code Review via automation Apr 13, 2022
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2022

Build succeeded.

@dmcgowan dmcgowan marked this pull request as ready for review April 13, 2022 03:17
@fuweid fuweid self-requested a review April 19, 2022 13:55
@fuweid fuweid self-assigned this Apr 19, 2022
metadata/db.go Outdated Show resolved Hide resolved
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

Basically, the change looks good.

The development doc is wanted I think~ It is not blocked.

Ensure the registered resource type does not conflict
with existing resource types or over the max.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2022

Build succeeded.

@dmcgowan dmcgowan moved this from New to Ready For Review in Code Review Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants