Files
containerd/oci
Mikko Ylinen e0f8c04dad cri: Devices ownership from SecurityContext
CRI container runtimes mount devices (set via kubernetes device plugins)
to containers by taking the host user/group IDs (uid/gid) to the
corresponding container device.

This triggers a problem when trying to run those containers with
non-zero (root uid/gid = 0) uid/gid set via runAsUser/runAsGroup:
the container process has no permission to use the device even when
its gid is permissive to non-root users because the container user
does not belong to that group.

It is possible to workaround the problem by manually adding the device
gid(s) to supplementalGroups. However, this is also problematic because
the device gid(s) may have different values depending on the workers'
distro/version in the cluster.

This patch suggests to take RunAsUser/RunAsGroup set via SecurityContext
as the device UID/GID, respectively. The feature must be enabled by
setting device_ownership_from_security_context runtime config value to
true (valid on Linux only).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-08-30 09:30:00 +03:00
..
2018-02-19 10:32:26 +09:00
2021-05-25 09:17:16 +02:00
2021-08-22 09:31:50 +09:00
2021-08-05 22:27:46 -07:00
2021-08-22 09:31:50 +09:00
2021-08-22 09:31:50 +09:00
2021-05-10 21:49:46 +02:00
2021-08-22 09:31:50 +09:00