sync container-runtimes coarse-parallel-processing-work-queue fine-parallel-processing-work-queue

This commit is contained in:
xin gu 2024-03-22 10:42:21 +08:00
parent 23471aabee
commit 27b2861579
3 changed files with 18 additions and 10 deletions

View File

@ -570,10 +570,10 @@ This config option supports live configuration reload to apply this change: `sys
{{< note >}}
<!--
These instructions assume that you are using the
[`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) adapter to integrate
[`cri-dockerd`](https://mirantis.github.io/cri-dockerd/) adapter to integrate
Docker Engine with Kubernetes.
-->
以下操作假设你使用 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) 适配器来将
以下操作假设你使用 [`cri-dockerd`](https://mirantis.github.io/cri-dockerd/) 适配器来将
Docker Engine 与 Kubernetes 集成。
{{< /note >}}
@ -585,10 +585,9 @@ Docker Engine 与 Kubernetes 集成。
指南为你的 Linux 发行版安装 Docker。
<!--
2. Install [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd), following
the instructions in that source code repository.
2. Install [`cri-dockerd`](https://mirantis.github.io/cri-dockerd/usage/install), following the directions in the install section of the documentation.
-->
2. 按照源代码仓库中的说明安装 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)。
2. 请按照文档中的安装部分指示来安装 [`cri-dockerd`](https://mirantis.github.io/cri-dockerd/usage/install)。
<!--
For `cri-dockerd`, the CRI socket is `/run/cri-dockerd.sock` by default.
@ -608,7 +607,7 @@ You can use Mirantis Container Runtime with Kubernetes using the open source
[Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html) (MCR)
是一种商用容器运行时,以前称为 Docker 企业版。
你可以使用 MCR 中包含的开源 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)
你可以使用 MCR 中包含的开源 [`cri-dockerd`](https://mirantis.github.io/cri-dockerd/)
组件将 Mirantis Container Runtime 与 Kubernetes 一起使用。
<!--

View File

@ -143,7 +143,7 @@ The next commands show what you need to run inside the interactive shell in that
下面是在该 Pod 的交互式 shell 中需要运行的命令:
```shell
apt-get update && apt-get install -y curl ca-certificates amqp-tools python dnsutils
apt-get update && apt-get install -y curl ca-certificates amqp-tools python3 dnsutils
```
<!--

View File

@ -111,6 +111,16 @@ You could also download the following files directly:
- [`rediswq.py`](/examples/application/job/redis/rediswq.py)
- [`worker.py`](/examples/application/job/redis/worker.py)
<!--
To start a single instance of Redis, you need to create the redis pod and redis service:
-->
要启动一个 Redis 实例,你需要创建 Redis Pod 和 Redis 服务:
```shell
kubectl apply -f https://k8s.io/examples/application/job/redis/redis-pod.yaml
kubectl apply -f https://k8s.io/examples/application/job/redis/redis-service.yaml
```
<!--
## Filling the queue with tasks
@ -278,7 +288,7 @@ Since the workers themselves detect when the workqueue is empty, and the Job con
know about the workqueue, it relies on the workers to signal when they are done working.
The workers signal that the queue is empty by exiting with success. So, as soon as **any** worker
exits with success, the controller knows the work is done, and that the Pods will exit soon.
So, we need to set the completion count of the Job to 1. The job controller will wait for
So, you need to leave the completion count of the Job unset. The job controller will wait for
the other pods to complete too.
-->
在这个例子中,每个 Pod 处理了队列中的多个项目,直到队列中没有项目时便退出。
@ -286,8 +296,7 @@ the other pods to complete too.
这依赖于工作程序在完成工作时发出信号。
工作程序以成功退出的形式发出信号表示工作队列已经为空。
所以,只要有**任意**一个工作程序成功退出,控制器就知道工作已经完成了,所有的 Pod 将很快会退出。
因此,我们需要将 Job 的完成计数Completion Count设置为 1。
尽管如此Job 控制器还是会等待其它 Pod 完成。
因此,你不需要设置 Job 的完成次数。Job 控制器还是会等待其它 Pod 完成。
<!--
## Running the Job