Merge pull request #42689 from asa3311/sync-zh-53

[zh] Replace codenew with code for 6 files in content/zh-cn/docs/tasks/job/
pull/42142/head
Kubernetes Prow Robot 2023-08-23 18:40:34 -07:00 committed by GitHub
commit 5345af43c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -38,7 +38,7 @@ Here is a manifest for a CronJob that runs a simple demonstration task every min
CronJob 需要一个配置文件。
以下是针对一个 CronJob 的清单,该 CronJob 每分钟运行一个简单的演示任务:
{{< codenew file="application/job/cronjob.yaml" >}}
{{% code file="application/job/cronjob.yaml" %}}
<!--
Run the example CronJob by using this command:

View File

@ -302,7 +302,7 @@ example program:
我们将用 `amqp-consume` 实用程序从队列中读取消息并运行实际的程序。
这里给出一个非常简单的示例程序:
{{< codenew language="python" file="application/job/rabbitmq/worker.py" >}}
{{% code language="python" file="application/job/rabbitmq/worker.py" %}}
<!--
Give the script execution permission:
@ -371,7 +371,7 @@ image to match the name you used, and call it `./job.yaml`.
这里给出一个 Job 定义 YAML 文件。你将需要拷贝一份 Job 并编辑该镜像以匹配你使用的名称,保存为 `./job.yaml`
{{< codenew file="application/job/rabbitmq/job.yaml" >}}
{{% code file="application/job/rabbitmq/job.yaml" %}}
<!--
In this example, each pod works on one item from the queue and then exits.

View File

@ -194,7 +194,7 @@ client library to get work. Here it is:
-->
Job 中每个 Pod 内的 “工作程序” 使用工作队列客户端库获取工作。具体如下:
{{< codenew language="python" file="application/job/redis/worker.py" >}}
{{% code language="python" file="application/job/redis/worker.py" %}}
<!--
You could also download [`worker.py`](/examples/application/job/redis/worker.py),
@ -257,7 +257,7 @@ Here is the job definition:
这是 Job 定义:
{{< codenew file="application/job/redis/job.yaml" >}}
{{% code file="application/job/redis/job.yaml" %}}
<!--
Be sure to edit the job template to

View File

@ -138,7 +138,7 @@ Here is a sample Job manifest that uses `Indexed` completion mode:
这是一个使用 `Indexed` 完成模式的示例 Job 清单:
{{< codenew language="yaml" file="application/job/indexed-job.yaml" >}}
{{% code language="yaml" file="application/job/indexed-job.yaml" %}}
<!--
In the example above, you use the builtin `JOB_COMPLETION_INDEX` environment
@ -169,7 +169,7 @@ like shown in the following example:
[使用 Downward API 将注解值作为卷文件传递](/zh-cn/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/#store-pod-fields)
如下例所示:
{{< codenew language="yaml" file="application/job/indexed-job-vol.yaml" >}}
{{% code language="yaml" file="application/job/indexed-job-vol.yaml" %}}
<!--
## Running the Job

View File

@ -76,7 +76,7 @@ First, download the following template of a job to a file called `job-tmpl.yaml`
-->
首先,将以下作业模板下载到名为 `job-tmpl.yaml` 的文件中。
{{< codenew file="application/job/job-tmpl.yaml" >}}
{{% code file="application/job/job-tmpl.yaml" %}}
```shell
# 使用 curl 下载 job-tmpl.yaml

View File

@ -72,7 +72,7 @@ Pod 失效策略来避免不必要的 Pod 重启。
首先,基于配置创建一个 Job
{{< codenew file="/controllers/job-pod-failure-policy-failjob.yaml" >}}
{{% code file="/controllers/job-pod-failure-policy-failjob.yaml" %}}
<!--
by running:
@ -150,7 +150,7 @@ node while the Pod is running on it (within 90s since the Pod is scheduled).
-->
1. 基于配置创建 Job
{{< codenew file="/controllers/job-pod-failure-policy-ignore.yaml" >}}
{{% code file="/controllers/job-pod-failure-policy-ignore.yaml" %}}
<!--
by running:
@ -250,7 +250,7 @@ deleted pods, in the `Pending` phase, to a terminal phase
-->
1. 首先基于配置创建一个 Job
{{< codenew file="/controllers/job-pod-failure-policy-config-issue.yaml" >}}
{{% code file="/controllers/job-pod-failure-policy-config-issue.yaml" %}}
<!--
by running: