Skip to content

Commit 7b7b8d2

Browse files
committed
[zh] Update restricted-psp.yaml
Signed-off-by: xin.li <[email protected]>
1 parent 8b78312 commit 7b7b8d2

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

content/zh/examples/policy/restricted-psp.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,43 @@ metadata:
55
annotations:
66
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
77
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
8-
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'runtime/default'
98
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
109
spec:
1110
privileged: false
12-
# Required to prevent escalations to root.
11+
# 防止权限升级到 root
1312
allowPrivilegeEscalation: false
14-
# This is redundant with non-root + disallow privilege escalation,
15-
# but we can provide it for defense in depth.
1613
requiredDropCapabilities:
1714
- ALL
18-
# Allow core volume types.
15+
# 允许的核心卷类型.
1916
volumes:
2017
- 'configMap'
2118
- 'emptyDir'
2219
- 'projected'
2320
- 'secret'
2421
- 'downwardAPI'
25-
# Assume that persistentVolumes set up by the cluster admin are safe to use.
22+
# 假设集群管理员设置的临时 CSI 驱动程序和持久卷可以安全使用
23+
- 'csi'
2624
- 'persistentVolumeClaim'
25+
- 'ephemeral'
2726
hostNetwork: false
2827
hostIPC: false
2928
hostPID: false
3029
runAsUser:
31-
# Require the container to run without root privileges.
30+
# 要求容器在没有 root 权限的情况下运行
3231
rule: 'MustRunAsNonRoot'
3332
seLinux:
34-
# This policy assumes the nodes are using AppArmor rather than SELinux.
33+
# 此策略假定节点使用 AppArmor 而不是 SELinux
3534
rule: 'RunAsAny'
3635
supplementalGroups:
3736
rule: 'MustRunAs'
3837
ranges:
39-
# Forbid adding the root group.
38+
# 禁止添加 root
4039
- min: 1
4140
max: 65535
4241
fsGroup:
4342
rule: 'MustRunAs'
4443
ranges:
45-
# Forbid adding the root group.
44+
# 禁止添加 root
4645
- min: 1
4746
max: 65535
4847
readOnlyRootFilesystem: false

0 commit comments

Comments
 (0)