Cri - Pass snapshotter labels into customopts.WithNewSnapshot

Previously there wwasn't a way to pass any labels to snapshotters as the wrapper
around WithNewSnapshot didn't have a parm to pass them in.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
This commit is contained in:
Daniel Canter
2020-10-14 04:14:03 -07:00
parent caad53dba7
commit 9a1f6ea4dc
4 changed files with 12 additions and 6 deletions

View File

@@ -346,7 +346,7 @@ func (s *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
defer scratchSource.Close()
// TODO: JTERRY75 - This has to be called sandbox.vhdx for the time
// being but it really is the scratch.vhdx Using this naming convention
// being but it really is the scratch.vhdx. Using this naming convention
// for now but this is not the kubernetes sandbox.
//
// Create the sandbox.vhdx for this snapshot from the cache.
@@ -371,7 +371,7 @@ func (s *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
}
func (s *snapshotter) openOrCreateScratch(ctx context.Context, sizeGB int) (_ *os.File, err error) {
// Create the scratch.vhdx cache file if it doesn't already exit.
// Create the scratch.vhdx cache file if it doesn't already exist.
s.scratchLock.Lock()
defer s.scratchLock.Unlock()