Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh-trans: add content/zh/docs/concepts/workloads/controllers/ttlafterfinished.md #15783

Merged

Conversation

@SataQiu
Copy link
Member

commented Aug 10, 2019

@markthink
Copy link
Member

left a comment

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Aug 11, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link

commented Aug 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markthink

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit bd811a4 into kubernetes:release-1.14 Aug 11, 2019

5 of 7 checks passed

tide Not mergeable. Needs approved, lgtm labels.
Details
Pages changed 2427 new files uploaded
Details
Header rules 1 header rule processed
Details
Mixed content No mixed content detected
Details
Redirect rules 1 redirect rule processed
Details
cla/linuxfoundation SataQiu authorized
Details
deploy/netlify Deploy preview ready!
Details
<!--
Alpha Disclaimer: this feature is currently alpha, and can be enabled with[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)`TTLAfterFinished`.
-->
Alpha 免责声明:此功能目前是 alpha 版,可以通过[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) `TTLAfterFinished` 启用。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Aug 11, 2019

Member

feature gate 是可以翻译的,"功能门"。

-->
TTL 控制器现在只支持 Jobs。集群操作员可以通过指定 Job 的 `.spec.ttlSecondsAfterFinished` 字段来自动清理已结束的作业(“完成”或“失败”),就像下边的[示例](/docs/concepts/workloads/controllers/jobs-run-to-completion/#clean-up-finished-jobs-automatically)。
<!--
The TTL controller will assume that a resource is eligible to be cleaned upTTL seconds after the resource has finished, in other words, when the TTL has expired. When the TTL controller cleans up a resource, it will delete it cascadingly, i.e. delete its dependent objects together with it. Note that when the resource is deleted,its lifecycle guarantees, such as finalizers, will be honored.

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Aug 11, 2019

Member

original text has some issue.
cleaned upTTL seconds -> cleaned up TTL seconds

<!--
The TTL seconds can be set at any time. Here are some examples for setting the`.spec.ttlSecondsAfterFinished` field of a Job:
-->
可以随时设置 TTL 秒。以下是设置 Job 的 `.spec.ttlSecondsAfterFinished` 字段的一些示例:

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Aug 11, 2019

Member

可以随时设置 TTL 秒。

这么翻译有歧义,应该是 TTL 秒的设置可以随时修改

-->
* 在资源清单(manifest)中指定此字段,以便作业在完成后的某个时间被自动清除。
* 将此字段设置为存在的、已完成的资源,以采用此新功能。
* 在资源创建时使用 [mutating admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks) 动态设置该字段。集群管理员可以使用它对完成的资源强制执行 TTL 策略。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Aug 11, 2019

Member

mutating admission webhook -> 修改接受 webhook

这个的翻译还可以探讨下

<!--
In Kubernetes, it's required to run NTP on all nodes(see [#6159](https://github.com/kubernetes/kubernetes/issues/6159#issuecomment-93844058))to avoid time skew. Clocks aren't always correct, but the difference should bevery small. Please be aware of this risk when setting a non-zero TTL.
-->
在 Kubernetes 中,需要在所有节点上运行 NTP(参见[#6159](https://github.com/kubernetes/kubernetes/issues/6159#issuecomment-93844058))以避免时间偏差。时钟并不总是如此正确,但差异应该很小。设置非零 TTL 时请注意这种风险。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Aug 11, 2019

Member

时钟偏移

<!--
Because TTL controller uses timestamps stored in the Kubernetes resources to determine whether the TTL has expired or not, this feature is sensitive to time skew in the cluster, which may cause TTL controller to clean up resource objects at the wrong time.
-->
由于 TTL 控制器使用存储在 Kubernetes 资源中的时间戳来确定 TTL 是否已过期,因此该功能对集群中的时间偏差很敏感,这可能导致 TTL 控制器在错误的时间清理资源对象。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Aug 11, 2019

Member

时钟偏移

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.