@@ -37,6 +37,7 @@ and does the following:
37
37
* Modifies the object to add a `metadata.deletionTimestamp` field with the
38
38
time you started the deletion.
39
39
* 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
40
41
* Returns a `202` status code (HTTP "Accepted")
41
42
-->
42
43
## Finalizers 如何工作 {#how-finalizers-work}
@@ -46,7 +47,7 @@ and does the following:
46
47
并进行以下操作:
47
48
48
49
* 修改对象,将你开始执行删除的时间添加到 ` metadata.deletionTimestamp ` 字段。
49
- * 禁止对象被删除,直到其 ` metadata.finalizers ` 字段为空 。
50
+ * 禁止对象被删除,直到其 ` metadata.finalizers ` 字段内的所有项被删除 。
50
51
* 返回 ` 202 ` 状态码(HTTP "Accepted")。
51
52
52
53
<!--
@@ -82,6 +83,23 @@ Kubernetes 会添加 `pv-protection` Finalizer。
82
83
当 Pod 停止使用 ` PersistentVolume ` 时,
83
84
Kubernetes 清除 ` pv-protection ` Finalizer,控制器就会删除该卷。
84
85
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
+
85
103
<!--
86
104
## Owner references, labels, and finalizers {#owners-labels-finalizers}
87
105
0 commit comments