Commit Graph

16 Commits

Author SHA1 Message Date
David Leadbeater
31a6449734 Add capability for snapshotters to declare support for UID remapping
This allows user namespace support to progress, either by allowing
snapshotters to deal with ownership, or falling back to containerd doing
a recursive chown.

In the future, when snapshotters implement idmap mounts, they should
report the "remap-ids" capability.

Co-authored-by: Rodrigo Campos <rodrigoca@microsoft.com>
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Signed-off-by: David Leadbeater <dgl@dgl.cx>
2022-12-21 15:08:28 -03:00
Maksym Pavlenko
ca3b9b50fe Run gofmt 1.19
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 18:18:33 -07:00
Swagat Bora
61690d76d2 Improve naming consistencies in comments in snapshotter.go
Signed-off-by: Swagat Bora <sbora@amazon.com>
2022-06-09 17:16:37 +00:00
austinvazquez
57d2bce749 docs: minor fixes in snapshots.Snapshotter comments
Signed-off-by: Austin Vazquez <austin.vazquez.dev@gmail.com>
2022-05-02 15:51:11 +00:00
Derek McGowan
35eeb24a17
Fix exported comments enforcer in CI
Add comments where missing and fix incorrect comments

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08:00
Daniel Canter
a91c298d1d Optimize Windows and LCOW snapshotters to only create scratch layer on the final snapshot
For LCOW currently we copy (or create) the scratch.vhdx for every single snapshot
so there ends up being a sandbox.vhdx in every directory seemingly unnecessarily. With the default scratch
size of 20GB the size on disk is about 17MB so there's a 17MB overhead per layer plus the time to copy the
file with every snapshot. Only the final sandbox.vhdx is actually used so this would be a nice little
optimization.

For WCOW we essentially do the exact same except copy the blank vhdx from the base layer.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2020-11-30 16:25:38 -08:00
Maksym Pavlenko
8cddb5f91d Pass snapshotter opts during Pull
For remote snapshotter cases it's quite often there is need to pass extra info
from client (for instance - registry URL to query remote layer from, credentials, etc).

This commit slightly extends WithPullSnapshotter to pass extra labels to a snapshotter.

Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-02 13:45:40 -08:00
Derek McGowan
123af61c0b
Add Cleanup to snapshot API
Cleanup is an optional method a snapshotter may implement.
Cleanup can be used to cleanup resources after a snapshot
has been removed. This function allows a snapshotter to defer
longer resource cleanup until after snapshot removals are
completed. Adding this to the API allows proxy snapshotters
to leverage this enhancement.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2020-01-07 14:59:20 -08:00
ktock
493a36de95 Move label filter to snapshots package
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2019-12-25 12:13:08 +09:00
Derek McGowan
66aa1d3ef6
Add snapshot walk implementations
Temporarily remove zfs and aufs until interface update

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-10-24 11:11:22 -07:00
bpopovschi
e8c14c07c6
Added filters to snapshots API
Signed-off-by: bpopovschi <zyqsempai@mail.ru>
2019-10-24 11:11:22 -07:00
Eric Hotinger
75f183887a Allow opts to flow to the backend snapshotter during snapshot creation.
Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-06-19 11:00:22 -07:00
Eric Hotinger
e13a4b67e8 Update the snapshotter docs to refer to the snapshots package for
WithLabels.

Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-02-28 15:03:37 -08:00
Oliver Stenbom
7f5d7ff6b8 Update snapshots docs with garbage collector label
Signed-off-by: Oliver Stenbom <oliver@stenbom.eu>
2019-01-29 15:37:56 +00:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Jess Valarezo
9885edfc44 rename snapshot->snapshots pkg
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-29 14:55:02 -08:00