Skip to content

Commit 2702f11

Browse files
authored
Merge pull request #24238 from fancc/seccomp
Translate Restrict a Container's Syscalls with Seccomp into Chinese
2 parents a92ca1b + 0dfed51 commit 2702f11

File tree

13 files changed

+740
-0
lines changed

13 files changed

+740
-0
lines changed

content/zh/docs/tutorials/clusters/seccomp.md

Lines changed: 527 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: audit-pod
5+
labels:
6+
app: audit-pod
7+
annotations:
8+
seccomp.security.alpha.kubernetes.io/pod: localhost/profiles/audit.json
9+
spec:
10+
containers:
11+
- name: test-container
12+
image: hashicorp/http-echo:0.2.3
13+
args:
14+
- "-text=just made some syscalls!"
15+
securityContext:
16+
allowPrivilegeEscalation: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: default-pod
5+
labels:
6+
app: default-pod
7+
annotations:
8+
seccomp.security.alpha.kubernetes.io/pod: runtime/default
9+
spec:
10+
containers:
11+
- name: test-container
12+
image: hashicorp/http-echo:0.2.3
13+
args:
14+
- "-text=just made some syscalls!"
15+
securityContext:
16+
allowPrivilegeEscalation: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: fine-pod
5+
labels:
6+
app: fine-pod
7+
annotations:
8+
seccomp.security.alpha.kubernetes.io/pod: localhost/profiles/fine-grained.json
9+
spec:
10+
containers:
11+
- name: test-container
12+
image: hashicorp/http-echo:0.2.3
13+
args:
14+
- "-text=just made some syscalls!"
15+
securityContext:
16+
allowPrivilegeEscalation: false
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: violation-pod
5+
labels:
6+
app: violation-pod
7+
annotations:
8+
seccomp.security.alpha.kubernetes.io/pod: localhost/profiles/violation.json
9+
spec:
10+
containers:
11+
- name: test-container
12+
image: hashicorp/http-echo:0.2.3
13+
args:
14+
- "-text=just made some syscalls!"
15+
securityContext:
16+
allowPrivilegeEscalation: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: audit-pod
5+
labels:
6+
app: audit-pod
7+
spec:
8+
securityContext:
9+
seccompProfile:
10+
type: Localhost
11+
localhostProfile: profiles/audit.json
12+
containers:
13+
- name: test-container
14+
image: hashicorp/http-echo:0.2.3
15+
args:
16+
- "-text=just made some syscalls!"
17+
securityContext:
18+
allowPrivilegeEscalation: false
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: audit-pod
5+
labels:
6+
app: audit-pod
7+
spec:
8+
securityContext:
9+
seccompProfile:
10+
type: RuntimeDefault
11+
containers:
12+
- name: test-container
13+
image: hashicorp/http-echo:0.2.3
14+
args:
15+
- "-text=just made some syscalls!"
16+
securityContext:
17+
allowPrivilegeEscalation: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: fine-pod
5+
labels:
6+
app: fine-pod
7+
spec:
8+
securityContext:
9+
seccompProfile:
10+
type: Localhost
11+
localhostProfile: profiles/fine-grained.json
12+
containers:
13+
- name: test-container
14+
image: hashicorp/http-echo:0.2.3
15+
args:
16+
- "-text=just made some syscalls!"
17+
securityContext:
18+
allowPrivilegeEscalation: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: violation-pod
5+
labels:
6+
app: violation-pod
7+
spec:
8+
securityContext:
9+
seccompProfile:
10+
type: Localhost
11+
localhostProfile: profiles/violation.json
12+
containers:
13+
- name: test-container
14+
image: hashicorp/http-echo:0.2.3
15+
args:
16+
- "-text=just made some syscalls!"
17+
securityContext:
18+
allowPrivilegeEscalation: false
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kind.x-k8s.io/v1alpha4
2+
kind: Cluster
3+
nodes:
4+
- role: control-plane
5+
extraMounts:
6+
- hostPath: "./profiles"
7+
containerPath: "/var/lib/kubelet/seccomp/profiles"

0 commit comments

Comments
 (0)