kubernetes/pkg/kubelet/dockertools
Kubernetes Submit Queue 4ddfc4849a Merge pull request #27180 from sttts/sysctl-implementation
Automatic merge from submit-queue

Add sysctl support

Implementation of proposal https://github.com/kubernetes/kubernetes/pull/26057, feature  https://github.com/kubernetes/features/issues/34

TODO:
- [x] change types.go
- [x] implement docker and rkt support
- [x] add e2e tests
- [x] decide whether we want apiserver validation
- ~~[ ] add documentation~~: api docs exist. Existing PodSecurityContext docs is very light and links back to the api docs anyway: 6684555ed9/docs/user-guide/security-context.md
- [x] change PodSecurityPolicy in types.go
- [x] write admission controller support for PodSecurityPolicy
- [x] write e2e test for PodSecurityPolicy
- [x] make sure we are compatible in the sense of https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api_changes.md
- [x] test e2e with rkt: it only works with kubenet, not with no-op network plugin. The later has no sysctl support.
- ~~[ ] add RunC implementation~~ (~~if that is already in kube,~~ it isn't)
- [x] update whitelist
- [x] switch PSC fields to annotations
- [x] switch PSP fields to annotations
- [x] decide about `--experimental-whitelist-sysctl` flag to be additive or absolute
- [x] decide whether to add a sysctl node whitelist annotation

### Release notes:

```release-note
The pod annotation `security.alpha.kubernetes.io/sysctls` now allows customization of namespaced and well isolated kernel parameters (sysctls), starting with `kernel.shm_rmid_forced`, `net.ipv4.ip_local_port_range`, `net.ipv4.tcp_max_syn_backlog` and `net.ipv4.tcp_syncookies` for Kubernetes 1.4.

The pod annotation  `security.alpha.kubernetes.io/unsafeSysctls` allows customization of namespaced sysctls where isolation is unclear. Unsafe sysctls must be enabled at-your-own-risk on the kubelet with the `--experimental-allowed-unsafe-sysctls` flag. Future versions will improve on resource isolation and more sysctls will be considered safe.
```
2016-08-25 06:21:24 -07:00
..
fixtures/seccomp Add profile unit tests 2016-06-13 14:39:09 +02:00
container_gc_test.go - Added a DeleteContainer method in Runtime interface 2016-07-08 10:40:30 -07:00
container_gc.go dockershim: implement ContainerStatus() 2016-07-28 18:24:29 -07:00
convert_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
convert.go Avoiding trying to gc images with no tags which are still in use 2016-07-27 10:31:47 -07:00
docker_manager_test.go Add network-plugin-mtu option for MTU selection 2016-08-23 01:50:58 -04:00
docker_manager.go Add sysctl whitelist on the node 2016-08-25 13:22:01 +02:00
docker_test.go Add network-plugin-mtu option for MTU selection 2016-08-23 01:50:58 -04:00
docker.go Fix image inspection and matching 2016-08-17 14:48:11 -07:00
exec.go Add return code support to kubectl-exec and -run 2016-08-20 15:58:47 +02:00
fake_docker_client.go dockershim: Implement sandbox methods 2016-08-02 15:24:52 -07:00
fake_manager.go Revert "Remove pod mutation for PVs with supplemental GIDs" 2016-07-14 17:47:46 -07:00
images_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
images.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
instrumented_docker.go Add a dockershim package 2016-07-27 18:30:25 -07:00
kube_docker_client.go Increase request timeout based on termination grace period 2016-08-23 13:44:11 -04:00
labels_test.go Add container ports label. 2016-08-08 18:40:18 -07:00
labels.go Add container ports label. 2016-08-08 18:40:18 -07:00