Akihiro Suda
3eda46af12
oci: fix additional GIDs
Test suite:
```yaml
---
apiVersion: v1
kind: Pod
metadata:
name: test-no-option
annotations:
description: "Equivalent of `docker run` (no option)"
spec:
restartPolicy: Never
containers:
- name: main
image: ghcr.io/containerd/busybox:1.28
args: ['sh', '-euxc',
'[ "$(id)" = "uid=0(root) gid=0(root) groups=0(root),10(wheel)" ]']
---
apiVersion: v1
kind: Pod
metadata:
name: test-group-add-1-group-add-1234
annotations:
description: "Equivalent of `docker run --group-add 1 --group-add 1234`"
spec:
restartPolicy: Never
containers:
- name: main
image: ghcr.io/containerd/busybox:1.28
args: ['sh', '-euxc',
'[ "$(id)" = "uid=0(root) gid=0(root) groups=0(root),1(daemon),10(wheel),1234" ]']
securityContext:
supplementalGroups: [1, 1234]
---
apiVersion: v1
kind: Pod
metadata:
name: test-user-1234
annotations:
description: "Equivalent of `docker run --user 1234`"
spec:
restartPolicy: Never
containers:
- name: main
image: ghcr.io/containerd/busybox:1.28
args: ['sh', '-euxc',
'[ "$(id)" = "uid=1234 gid=0(root) groups=0(root)" ]']
securityContext:
runAsUser: 1234
---
apiVersion: v1
kind: Pod
metadata:
name: test-user-1234-1234
annotations:
description: "Equivalent of `docker run --user 1234:1234`"
spec:
restartPolicy: Never
containers:
- name: main
image: ghcr.io/containerd/busybox:1.28
args: ['sh', '-euxc',
'[ "$(id)" = "uid=1234 gid=1234 groups=1234" ]']
securityContext:
runAsUser: 1234
runAsGroup: 1234
---
apiVersion: v1
kind: Pod
metadata:
name: test-user-1234-group-add-1234
annotations:
description: "Equivalent of `docker run --user 1234 --group-add 1234`"
spec:
restartPolicy: Never
containers:
- name: main
image: ghcr.io/containerd/busybox:1.28
args: ['sh', '-euxc',
'[ "$(id)" = "uid=1234 gid=0(root) groups=0(root),1234" ]']
securityContext:
runAsUser: 1234
supplementalGroups: [1234]
```
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-10 15:53:00 +09:00
..
2022-12-29 14:25:14 +08:00
2020-04-22 19:35:37 -05:00
2023-01-03 12:47:16 -08:00
2023-01-03 12:30:26 -08:00
2023-02-10 15:53:00 +09:00
2022-12-29 14:25:14 +08:00
2023-01-31 23:26:02 +09:00
2022-08-04 18:18:33 -07:00
2022-12-08 18:50:00 +09:00
2022-08-04 18:18:33 -07:00
2022-04-06 07:14:18 +08:00
2022-12-30 00:22:03 -08:00
2022-12-29 14:25:14 +08:00
2022-12-29 14:25:14 +08:00
2023-01-11 13:03:59 -08:00
2023-01-27 09:51:58 +08:00
2022-10-12 14:41:01 +02:00
2022-01-07 10:27:03 +08:00
2022-12-07 10:55:06 -08:00
2021-10-08 16:18:09 +00:00
2022-12-29 14:25:14 +08:00
2022-12-29 14:25:14 +08:00
2021-12-14 00:09:17 +01:00
2022-11-16 22:03:44 -08:00
2023-02-01 23:03:23 +09:00
2020-08-25 17:28:29 -07:00
2022-11-30 12:55:56 -08:00
2022-12-29 14:25:14 +08:00
2021-11-16 11:06:40 +08:00
2022-12-02 22:30:54 -08:00
2022-05-26 13:02:45 -07:00
2022-07-20 22:53:42 +08:00
2023-01-04 11:22:24 -08:00
2022-12-29 14:25:14 +08:00