Commit Graph

30 Commits

Author SHA1 Message Date
Yanqiang Miao
49eb38a5d4 Ensure the mount point is propagated
mount with `rshared`, the host path should be shared.
mount with `rslave`, the host pash should be shared or slave.

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-09-19 14:21:21 +08:00
Lantao Liu
cd27050425 Add image volume support.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-15 11:25:55 +01:00
Ian Campbell
56539bd3a4 Require generateContainerSpec passes during tests and abort if not
This is achieved by switching `assert.NoError` to `require.NoError` in several
places.

Otherwise the test code will continue and dereference a nil spec, leading to a
panic which obscures the real failure.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-15 11:06:25 +01:00
Lantao Liu
0bfcdd39ab Remove /run mount for backward compatibility with docker.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-09 07:34:00 +00:00
Lantao Liu
3e4b4234c6 Merge pull request #218 from miaoyq/fixes-185
Update kubernetes version and support mount propagation
2017-09-06 21:03:56 -07:00
Yanqiang Miao
9da460ec0a Support mount propagation
fixex #185

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-09-07 08:58:20 +08:00
Lantao Liu
8569fa366e Merge pull request #215 from Random-Liu/add-capability-all
Add "ALL" capabilities support.
2017-09-05 18:14:36 -07:00
Lantao Liu
d02ecc4673 Add "ALL" capabilities support.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-06 00:05:08 +00:00
Ian Campbell
1dea8fdfc4 Handle environment variables which containe spaces
This avoids errors such as:

    spec: invalid environment variable "JAVA_OPTS=-Djava.security.egd=file:/dev/urandom"

use SplitN(2) to get the envvar name and value while allowing the value to
contain `=`.

Add some variables to the test data which have one or more `=` in the value.
Since this makes the resulting list of variables to check rather long split the
check in two and check the container config and image config derived values
independently.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-05 23:06:07 +01:00
Yanqiang Miao
0c3304e006 Support selinux options/label
Support selinux optios/label

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-31 19:20:12 +08:00
Lantao Liu
3f4978b77b Use rbind and rprivate in bind mount.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-30 01:40:03 +00:00
Lantao Liu
f46cd1a71a Disable pid namespace sharing
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-28 05:44:46 +00:00
Lantao Liu
270e09ab26 Use containerd WithUserID.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 21:11:56 +00:00
Lantao Liu
a80df151d1 Add RunAsUsername support.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-25 00:47:35 +00:00
Yanqiang Miao
1aec120d5f Support NoNewPrivileges
fixes #117

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-24 08:37:40 +08:00
Yanqiang Miao
8adad23015 Group all privileged logic together
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-08-22 09:16:37 +08:00
Lantao Liu
2427d332f0 Add TERM=xterm when tty=true.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-11 16:53:40 +00:00
Mike Brown
73748840da Swicth to 1.0.0-alpha2 containerd api.
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-08-02 23:21:37 +00:00
Lantao Liu
ffb69423ec Temporarily remove unit test relying on fake containerd services.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-07-31 22:42:10 +00:00
Lantao Liu
7b16a35287 Use new metadata store.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-07-28 23:35:31 +00:00
Random-Liu
b398a161de Get runtime spec from container metadata.
Signed-off-by: Random-Liu <lantaol@google.com>
2017-07-28 16:26:20 +00:00
Lantao Liu
7ddc85f3ca Remove unused fields and comments.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-28 16:59:35 +00:00
Lantao Liu
862d00a21c Update CRI to d779e9c9561b732adf06263c5424889e7564fdbd.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-21 01:56:13 +00:00
Lantao Liu
9b79201aa5 Add ExecSync.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 22:28:48 +00:00
Lantao Liu
cb9e104cf1 Create/delete containerd containerd
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 16:43:13 +00:00
Lantao Liu
bad279e0f6 Finish snapshot support.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 02:34:43 +00:00
Mike Brown
484a326717 modify code to compile on updated containerd
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-06-15 23:14:21 +00:00
Lantao Liu
dee95bc315 Add unit test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-05-31 01:18:22 +00:00
Crazykev
49e7ef2153 update kubernetes vendor for new CRI change
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-05-24 10:25:55 +08:00
Lantao Liu
322b6ef333 Add unit test.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-05-22 19:14:09 +00:00