Skip to content

Commit 7e6ab84

Browse files
committed
cri: Throw an error if idmap mounts is requested
We need support in containerd and the OCI runtime to use idmap mounts. Let's just throw an error for now if the kubelet requests some mounts with mappings. Signed-off-by: Rodrigo Campos <[email protected]>
1 parent 85afda6 commit 7e6ab84

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/cri/opts/spec_linux_opts.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ func WithMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*ru
163163
return fmt.Errorf("relabel %q with %q failed: %w", src, mountLabel, err)
164164
}
165165
}
166+
if mount.UidMappings != nil || mount.GidMappings != nil {
167+
return fmt.Errorf("idmap mounts not yet supported, but they were requested for: %q", src)
168+
}
169+
166170
s.Mounts = append(s.Mounts, runtimespec.Mount{
167171
Source: src,
168172
Destination: dst,

0 commit comments

Comments
 (0)