Provide a flag which configures a lease to only hold
reference to its given references and ignore label references
during garbage collection rooted from the lease.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Marks and sweeps unreferenced objects.
Add snapshot cleanup to metadata.
Add content garbage collection
Add dirty flags for snapshotters and content store which
are set on deletion and used during the next garbage collection.
Cleanup content store backend when content metadata is removed.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
As a minimum, we would like to maintain generic garbage collection of
containerd resources. This includes images, bundles, containers and
arbitrary content.
The included implementation is just a textbook toy that we can use to
inform the requirements of gc. It implements a simple, stack-based
tricolor algorithm. Nothing special.
Mostly, this is to ensure we think about garbage collection from the
start, rather than as an afterthought or follow on feature.
Signed-off-by: Stephen J Day <stephen.day@docker.com>