Skip to content

Commit 9c5b468

Browse files
authored
Merge pull request #26232 from ydFu/update-misc-batch-5
[zh] Sync concepts pages for policy
2 parents 5255442 + 1078f3f commit 9c5b468

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

content/zh/docs/concepts/policy/pod-security-policy.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Pod 安全策略
33
content_type: concept
4-
weight: 20
4+
weight: 30
55
---
66
<!--
77
reviewers:
88
- pweil-
99
- tallclair
1010
title: Pod Security Policies
1111
content_type: concept
12-
weight: 20
12+
weight: 30
1313
-->
1414

1515
{{< feature-state state="beta" >}}
@@ -404,12 +404,19 @@ kubectl-user create -f- <<EOF
404404
apiVersion: v1
405405
kind: Pod
406406
metadata:
407-
name: pause
407+
name: pause
408408
spec:
409409
containers:
410-
- name: pause
410+
- name: pause
411411
image: k8s.gcr.io/pause
412412
EOF
413+
```
414+
415+
<!--
416+
The output is similar to this:
417+
-->
418+
输出类似于:
419+
```
413420
Error from server (Forbidden): error when creating "STDIN": pods "pause" is forbidden: unable to validate against any pod security policy: []
414421
```
415422
@@ -487,16 +494,17 @@ kubectl-user create -f- <<EOF
487494
apiVersion: v1
488495
kind: Pod
489496
metadata:
490-
name: pause
497+
name: pause
491498
spec:
492499
containers:
493-
- name: pause
500+
- name: pause
494501
image: k8s.gcr.io/pause
495502
EOF
496503
```
497-
498-
输出:
499-
504+
<!--
505+
The output is similar to this:
506+
-->
507+
输出类似于:
500508
```
501509
pod "pause" created
502510
```
@@ -513,18 +521,21 @@ kubectl-user create -f- <<EOF
513521
apiVersion: v1
514522
kind: Pod
515523
metadata:
516-
name: privileged
524+
name: privileged
517525
spec:
518526
containers:
519-
- name: pause
527+
- name: pause
520528
image: k8s.gcr.io/pause
521529
securityContext:
522530
privileged: true
523531
EOF
524532
```
525533

526-
输出为:
534+
<!--
535+
The output is similar to this:
536+
-->
527537

538+
输出类似于:
528539
```
529540
Error from server (Forbidden): error when creating "STDIN": pods "privileged" is forbidden: unable to validate against any pod security policy: [spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]
530541
```

content/zh/docs/concepts/policy/resource-quotas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: 资源配额
33
content_type: concept
4-
weight: 10
4+
weight: 20
55
---
66

77
<!--
88
reviewers:
99
- derekwaynecarr
1010
title: Resource Quotas
1111
content_type: concept
12-
weight: 10
12+
weight: 20
1313
-->
1414

1515
<!-- overview -->

0 commit comments

Comments
 (0)