Skip to content

Commit 43d2a62

Browse files
committed
[ja] Add runAsGroup and change appropriate image
1 parent 291e3bf commit 43d2a62

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

content/ja/examples/pods/security/security-context-2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ spec:
1010
image: gcr.io/google-samples/node-hello:1.0
1111
securityContext:
1212
runAsUser: 2000
13-
allowPrivilegeEscalation: false
13+
allowPrivilegeEscalation: false

content/ja/examples/pods/security/security-context-3.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@ metadata:
55
spec:
66
containers:
77
- name: sec-ctx-3
8-
image: gcr.io/google-samples/node-hello:1.0
9-
10-
11-
8+
image: gcr.io/google-samples/node-hello:1.0

content/ja/examples/pods/security/security-context-4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ spec:
88
image: gcr.io/google-samples/node-hello:1.0
99
securityContext:
1010
capabilities:
11-
add: ["NET_ADMIN", "SYS_TIME"]
11+
add: ["NET_ADMIN", "SYS_TIME"]

content/ja/examples/pods/security/security-context.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ metadata:
55
spec:
66
securityContext:
77
runAsUser: 1000
8+
runAsGroup: 3000
89
fsGroup: 2000
910
volumes:
1011
- name: sec-ctx-vol
1112
emptyDir: {}
1213
containers:
1314
- name: sec-ctx-demo
14-
image: gcr.io/google-samples/node-hello:1.0
15+
image: busybox:1.28
16+
command: [ "sh", "-c", "sleep 1h" ]
1517
volumeMounts:
1618
- name: sec-ctx-vol
1719
mountPath: /data/demo
1820
securityContext:
19-
allowPrivilegeEscalation: false
21+
allowPrivilegeEscalation: false

0 commit comments

Comments
 (0)