AdditionalSupport for SubPath volume mounts

Add support for inspecting Mounts which include SubPaths.

Handle SubPaths for kubernetes image volumes.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2024-11-05 16:03:34 -05:00
parent c0e24c6b60
commit 6346a11b09
4 changed files with 14 additions and 1 deletions

View File

@@ -575,7 +575,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener
Destination: volume.MountPath,
ReadWrite: false,
Source: volumeSource.Source,
SubPath: "",
SubPath: volume.SubPath,
}
s.ImageVolumes = append(s.ImageVolumes, &imageVolume)
default: