Merge pull request #32365 from my-git9/my-demo-branch318

[zh] Update finalizer.md
This commit is contained in:
Kubernetes Prow Robot
2022-03-18 23:19:08 -07:00
committed by GitHub
@@ -41,15 +41,16 @@ Finalizer 提醒{{<glossary_tooltip text="控制器" term_id="controller">}}清
<!--
When you tell Kubernetes to delete an object that has finalizers specified for
it, the Kubernetes API marks the object for deletion, putting it into a
read-only state. The target object remains in a terminating state while the
it, the Kubernetes API marks the object for deletion by populating `.metadata.deletionTimestamp`,
and returns a `202` status code (HTTP "Accepted"). The target object remains in a terminating state while the
control plane, or other components, take the actions defined by the finalizers.
After these actions are complete, the controller removes the relevant finalizers
from the target object. When the `metadata.finalizers` field is empty,
Kubernetes considers the deletion complete.
-->
当你告诉 Kubernetes 删除一个指定了 Finalizer 的对象时,
Kubernetes API 会将该对象标记删除,使其进入只读状态。
Kubernetes API 通过填充 `.metadata.deletionTimestamp`标记删除的对象
并返回`202`状态码 (HTTP "已接受") 使其进入只读状态。
此时控制平面或其他组件会采取 Finalizer 所定义的行动,
而目标对象仍然处于终止中(Terminating)的状态。
这些行动完成后,控制器会删除目标对象相关的 Finalizer。