Commit Graph

13 Commits

Author SHA1 Message Date
Maksym Pavlenko
38f19f991e Add config flag to default empty seccomp profile
This changes adds `default_seccomp_profile` config switch to apply default seccomp profile when not provided by k8s.a

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-05-08 13:24:38 -07:00
Mike Brown
4ea4ca99c7
Merge pull request #1455 from 6WIND/master
fix incomplete host device for PrivilegedWithoutHostDevices
2020-04-26 22:28:20 -05:00
Mike Brown
776c125e4f move up to latest critools; add apparmor profile check
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-04-26 16:16:48 -05:00
Mike Brown
1b60224e2e use containerd/project header test
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-04-22 19:35:37 -05:00
Thibaut Collet
98f8ec4995 fix incomplete host device for PrivilegedWithoutHostDevices
For a privilege pods with PrivilegedWithoutHostDevices set to true
host device specified in the config are not provided (whereas it is done for
non privilege pods or privilege pods with PrivilegedWithoutHostDevices set
to false as all devices are included).

Add them in this case.

Fixes: 3353ab76d9 ("Add flag to overload default privileged host device behaviour")
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
2020-04-22 18:20:36 +02:00
Chethan Suresh
7fc8652e32 Add OCI annotations for container name
Along with type(Sandbox or Container) and Sandbox name annotations
provide support for additional annotation:
  - Container name

This will help us perform per container operation by comparing it
with pass through annotations (eg. pod metadata annotations from K8s)

Signed-off-by: Chethan Suresh <Chethan.Suresh@sony.com>
2020-04-16 07:14:58 +05:30
Akihiro Suda
fa72e2f693 cgroup2: do not unshare cgroup namespace for privileged
Conforms to the latest KEP:
0e409b4749/keps/sig-node/20191118-cgroups-v2.md (cgroup-namespace)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-09 01:49:04 +09:00
Akihiro Suda
71740399e0 cgroup2: unshare cgroup namespace for containers
In cgroup v1 container implementations, cgroupns is not used by default because
it was not available in the kernel until kernel 4.6 (May 2016), and the default
behavior will not change on cgroup v1 environments, because changing the
default will break compatibility and surprise users.

For cgroup v2, implementations are going to unshare cgroupns by default
so as to hide /sys/fs/cgroup from containers.

* Discussion: https://github.com/containers/libpod/issues/4363
* Podman PR (merged): https://github.com/containers/libpod/pull/4374
* Moby PR: https://github.com/moby/moby/pull/40174

This PR enables cgroupns for containers, but pod sandboxes are untouched
because probably there is no need to do.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-01-09 14:58:30 +09:00
Lantao Liu
0c2d3b718d Fix privileged devices.
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-12-09 17:43:06 -08:00
bpopovschi
5d7bd738e4 Use containerD WithHostDevices
Signed-off-by: bpopovschi <zyqsempai@mail.ru>
2019-12-04 11:34:46 +02:00
Phil Estes
229eb19bd6
Add back default UNIX env to container config
Due to changes to the defaults in containerd, the CRI path to creating a
container OCI config needs to add back in the default UNIX $PATH (and
any other defaults) as that is the expected behavior from other
runtimes.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2019-09-19 09:00:25 -04:00
Ed Bartosh
05a9028969 Use container annotations when creating containers
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2019-09-10 11:28:59 +03:00
Lantao Liu
50c73e6dc5 Move unix specific logic into _unix.go
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-09-03 16:23:42 -07:00