[ja] Add runAsGroup and change appropriate image

pull/45536/head
mochizuki875 2024-03-13 12:44:13 +00:00
parent 291e3bf7cf
commit 43d2a62aa1
4 changed files with 7 additions and 8 deletions

View File

@ -10,4 +10,4 @@ spec:
image: gcr.io/google-samples/node-hello:1.0
securityContext:
runAsUser: 2000
allowPrivilegeEscalation: false
allowPrivilegeEscalation: false

View File

@ -5,7 +5,4 @@ metadata:
spec:
containers:
- name: sec-ctx-3
image: gcr.io/google-samples/node-hello:1.0
image: gcr.io/google-samples/node-hello:1.0

View File

@ -8,4 +8,4 @@ spec:
image: gcr.io/google-samples/node-hello:1.0
securityContext:
capabilities:
add: ["NET_ADMIN", "SYS_TIME"]
add: ["NET_ADMIN", "SYS_TIME"]

View File

@ -5,15 +5,17 @@ metadata:
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
volumes:
- name: sec-ctx-vol
emptyDir: {}
containers:
- name: sec-ctx-demo
image: gcr.io/google-samples/node-hello:1.0
image: busybox:1.28
command: [ "sh", "-c", "sleep 1h" ]
volumeMounts:
- name: sec-ctx-vol
mountPath: /data/demo
securityContext:
allowPrivilegeEscalation: false
allowPrivilegeEscalation: false