Skip to content

Commit 2a745f4

Browse files
authored
Merge pull request #38712 from windsonsea/podread
[zh] Fix rendering issues in pod-scheduling-readiness.md
2 parents f6d7c49 + 2c90668 commit 2a745f4

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

content/zh-cn/docs/concepts/scheduling-eviction/pod-scheduling-readiness.md

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,12 @@ criteria that Pod should be satisfied before considered schedulable. This field
4141
only when a Pod is created (either by the client, or mutated during admission). After creation,
4242
each schedulingGate can be removed in arbitrary order, but addition of a new scheduling gate is disallowed.
4343
-->
44-
## 配置 Pod schedulingGates
44+
## 配置 Pod schedulingGates {#configuring-pod-schedulinggates}
4545

4646
`schedulingGates` 字段包含一个字符串列表,每个字符串文字都被视为 Pod 在被认为可调度之前应该满足的标准。
4747
该字段只能在创建 Pod 时初始化(由客户端创建,或在准入期间更改)。
4848
创建后,每个 schedulingGate 可以按任意顺序删除,但不允许添加新的调度门控。
4949

50-
<!--
51-
{{<mermaid>}}
52-
stateDiagram-v2
53-
s1: 创建 Pod
54-
s2: pod scheduling gated
55-
s3: pod scheduling ready
56-
s4: pod running
57-
if: empty scheduling gates?
58-
[*] --> s1
59-
s1 --> if
60-
s2 --> if: scheduling gate removed
61-
if --> s2: no
62-
if --> s3: yes
63-
s3 --> s4
64-
s4 --> [*]
65-
{{< /mermaid >}}
66-
-->
6750
{{<mermaid>}}
6851
stateDiagram-v2
6952
s1: 创建 Pod
@@ -84,17 +67,16 @@ stateDiagram-v2
8467
## Usage example
8568
8669
To mark a Pod not-ready for scheduling, you can create it with one or more scheduling gates like this:
87-
88-
{{< codenew file="pods/pod-with-scheduling-gates.yaml" >}}
89-
90-
After the Pod's creation, you can check its state using:
9170
-->
92-
## 用法示例
71+
## 用法示例 {#usage-example}
9372

9473
要将 Pod 标记为未准备好进行调度,你可以在创建 Pod 时附带一个或多个调度门控,如下所示:
9574

9675
{{< codenew file="pods/pod-with-scheduling-gates.yaml" >}}
9776

77+
<!--
78+
After the Pod's creation, you can check its state using:
79+
-->
9880
Pod 创建后,你可以使用以下方法检查其状态:
9981

10082
```bash
@@ -132,15 +114,14 @@ The output is:
132114
<!--
133115
To inform scheduler this Pod is ready for scheduling, you can remove its `schedulingGates` entirely
134116
by re-applying a modified manifest:
135-
136-
{{< codenew file="pods/pod-without-scheduling-gates.yaml" >}}
137-
138-
You can check if the `schedulingGates` is cleared by running:
139117
-->
140118
要通知调度程序此 Pod 已准备好进行调度,你可以通过重新应用修改后的清单来完全删除其 `schedulingGates`
141119

142120
{{< codenew file="pods/pod-without-scheduling-gates.yaml" >}}
143121

122+
<!--
123+
You can check if the `schedulingGates` is cleared by running:
124+
-->
144125
你可以通过运行以下命令检查 `schedulingGates` 是否已被清空:
145126

146127
```bash
@@ -174,7 +155,7 @@ The metric `scheduler_pending_pods` comes with a new label `"gated"` to distingu
174155
has been tried scheduling but claimed as unschedulable, or explicitly marked as not ready for
175156
scheduling. You can use `scheduler_pending_pods{queue="gated"}` to check the metric result.
176157
-->
177-
## 可观测性
158+
## 可观测性 {#observability}
178159

179160
指标 `scheduler_pending_pods` 带有一个新标签 `"gated"`
180161
以区分 Pod 是否已尝试调度但被宣称不可调度,或明确标记为未准备好调度。
@@ -185,5 +166,4 @@ scheduling. You can use `scheduler_pending_pods{queue="gated"}` to check the met
185166
<!--
186167
* Read the [PodSchedulingReadiness KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/3521-pod-scheduling-readiness) for more details
187168
-->
188-
189169
* 阅读 [PodSchedulingReadiness KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/3521-pod-scheduling-readiness) 了解更多详情

0 commit comments

Comments
 (0)