mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
This commit only changes the UID/GID if user namespaces is enabled. When it is enabled, it changes it so the hostUID and hostGID that are mapped to the currently used UID/GID. This is needed so volumes are created with the hostUID/hostGID and the user inside the container can read them. If user namespaces are disabled for this pod, this is a no-op: there is no user namespace mapping, so the hostUID/hostGID are the same as inside the container. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>