Commit Graph

7 Commits

Author SHA1 Message Date
Derek McGowan
508aa3a1ef
Move to use github.com/containerd/log
Add github.com/containerd/log to go.mod

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Rodrigo Campos
a81f80884b Revert "cri: Throw an error if idmap mounts is requested"
This reverts commit 7e6ab84884.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Rodrigo Campos
97dfa7f556 cri/server: Pass down uidMappings to OCI runtime
When the kubelet sends the uid/gid mappings for a mount, just pass them
down to the OCI runtime.

OCI runtimes support this since runc 1.2 and crun 1.8.1.

And whenever we add mounts (container mounts or image spec volumes) and
userns are requested by the kubelet, we use those mappings in the mounts
so the mounts are idmapped correctly. If no userns is used, we don't
send any mappings which just keeps the current behavior.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:42:31 +02:00
Qasim Sarfraz
06f18c69d2 cri: memory.memsw.limit_in_bytes: no such file or directory
If kubelet passes the swap limit (default memory limit = swap limit ),
it is configured for container irrespective if the node supports swap.

Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
2023-07-21 14:43:33 +02:00
Maksym Pavlenko
6f34da5f80 Cleanup logrus imports
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-05 11:54:14 -07:00
Rodrigo Campos
7e6ab84884 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 <rodrigoca@microsoft.com>
2023-04-11 21:31:12 +02:00
Maksym Pavlenko
40be96efa9 Have separate spec builder for each platform
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:12:25 -08:00