Skip to content

proposal: flat lease GC flag #3307

@dmcgowan

Description

@dmcgowan

Add a GC flag for leases which allows the lease to define a single depth of references to be held by the lease. This covers the case where a longer term lease is being used to hold a set of objects, however another client adds more reference information. Currently this lease will end up with all those references even if the original client removes the object referring to them. For example, an image pull will create layers and refer to those layers from a manifest, but another client is leasing the same manifest for its own cache and is now unintentionally owning the referenced layers.

To support this, add a GC label containerd.io/gc.flat to indicate the lease contains all the objects it intends to hold, and nothing more. The default behavior will remain the same and this flag would be unnecessary for short duration or soon to expire leases.

Follow up to #3295

cc @tonistiigi

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions