Skip to content

Commit 145957d

Browse files
committed
[zh-cn] sync finalizers.md
1 parent 6158748 commit 145957d

File tree

1 file changed

+19
-1
lines changed
  • content/zh-cn/docs/concepts/overview/working-with-objects

1 file changed

+19
-1
lines changed

content/zh-cn/docs/concepts/overview/working-with-objects/finalizers.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ and does the following:
3737
* Modifies the object to add a `metadata.deletionTimestamp` field with the
3838
time you started the deletion.
3939
* Prevents the object from being removed until its `metadata.finalizers` field is empty.
40+
* Prevents the object from being removed until all items are removed from its `metadata.finalizers` field
4041
* Returns a `202` status code (HTTP "Accepted")
4142
-->
4243
## Finalizers 如何工作 {#how-finalizers-work}
@@ -46,7 +47,7 @@ and does the following:
4647
并进行以下操作:
4748

4849
* 修改对象,将你开始执行删除的时间添加到 `metadata.deletionTimestamp` 字段。
49-
* 禁止对象被删除,直到其 `metadata.finalizers` 字段为空
50+
* 禁止对象被删除,直到其 `metadata.finalizers` 字段内的所有项被删除
5051
* 返回 `202` 状态码(HTTP "Accepted")。
5152

5253
<!--
@@ -82,6 +83,23 @@ Kubernetes 会添加 `pv-protection` Finalizer。
8283
当 Pod 停止使用 `PersistentVolume` 时,
8384
Kubernetes 清除 `pv-protection` Finalizer,控制器就会删除该卷。
8485

86+
{{<note>}}
87+
<!--
88+
* When you `DELETE` an object, Kubernetes adds the deletion timestamp for that object and then
89+
immediately starts to restrict changes to the `.metadata.finalizers` field for the object that is
90+
now pending deletion. You can remove existing finalizers (deleting an entry from the `finalizers`
91+
list) but you cannot add a new finalizer. You also cannot modify the `deletionTimestamp` for an
92+
object once it is set.
93+
94+
* After the deletion is requested, you can not resurrect this object. The only way is to delete it and make a new similar object.
95+
-->
96+
* 当你 `DELETE` 一个对象时,Kubernetes 为该对象增加删除时间戳,然后立即开始限制
97+
对这个正处于待删除状态的对象的 `.metadata.finalizers` 字段进行修改。
98+
你可以删除现有的 finalizers (从 `finalizers` 列表删除条目),但你不能添加新的 finalizer。
99+
对象的 `deletionTimestamp` 被设置后也不能修改。
100+
* 删除请求已被发出之后,你无法复活该对象。唯一的方法是删除它并创建一个新的相似对象。
101+
{{</note>}}
102+
85103
<!--
86104
## Owner references, labels, and finalizers {#owners-labels-finalizers}
87105

0 commit comments

Comments
 (0)