cri-api: add mappings for volumes

add the definitions for the ID mappings to use at runtime for the
volume mount.  This is supported only on Linux where idmapped mounts
are used to perform the runtime mapping.

The new fields are mapped directly to the field in the OCI runtime
specs:

https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-mounts

The CRI runtime will pass the mappings to the OCI runtime as-is.

Related to KEP-127.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2023-02-15 15:03:07 +01:00
parent de9ce03f19
commit 79a34cf6a4
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
2 changed files with 554 additions and 410 deletions

File diff suppressed because it is too large Load Diff

View File

@ -222,6 +222,10 @@ message Mount {
bool selinux_relabel = 4;
// Requested propagation mode.
MountPropagation propagation = 5;
// UidMappings specifies the runtime UID mappings for the mount.
repeated IDMapping uidMappings = 6;
// GidMappings specifies the runtime GID mappings for the mount.
repeated IDMapping gidMappings = 7;
}
// IDMapping describes host to container ID mappings for a pod sandbox.