Skip to content

Commit f971d36

Browse files
authored
Merge pull request #29984 from superleo/branch1
[zh] Concept files to sync for 1.22 - task13 - k8s Extension
2 parents d336055 + b67a853 commit f971d36

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

content/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ The aggregation layer allows Kubernetes to be extended with additional APIs, bey
2323
而不局限于 Kubernetes 核心 API 提供的功能。
2424

2525
<!--
26-
The additional APIs can either be ready-made solutions such as [service-catalog](/docs/concepts/extend-kubernetes/service-catalog/), or APIs that you develop yourself.
26+
The additional APIs can either be ready-made solutions such as a [metrics server](https://github.com/kubernetes-sigs/metrics-server), or APIs that you develop yourself.
2727
2828
The aggregation layer is different from [Custom Resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/), which are a way to make the {{< glossary_tooltip term_id="kube-apiserver" text="kube-apiserver" >}} recognise new kinds of object.
2929
-->
30-
这里的附加 API 可以是[服务目录](/zh/docs/concepts/extend-kubernetes/service-catalog/)
31-
这类已经成熟的解决方案,也可以是你自己开发的 API。
30+
这里的附加 API 可以是现成的解决方案比如
31+
[metrics server](https://github.com/kubernetes-sigs/metrics-server),
32+
或者你自己开发的 API。
3233

3334
聚合层不同于
3435
[定制资源(Custom Resources)](/zh/docs/concepts/extend-kubernetes/api-extension/custom-resources/)

content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,12 @@ service PodResourcesLister {
334334
<!--
335335
The `List` endpoint provides information on resources of running pods, with details such as the
336336
id of exclusively allocated CPUs, device id as it was reported by device plugins and id of
337-
the NUMA node where these devices are allocated.
337+
the NUMA node where these devices are allocated. Also, for NUMA-based machines, it contains
338+
the information about memory and hugepages reserved for a container.
338339
-->
339340
这一 `List` 端点提供运行中 Pods 的资源信息,包括类似独占式分配的
340341
CPU ID、设备插件所报告的设备 ID 以及这些设备分配所处的 NUMA 节点 ID。
342+
此外,对于基于 NUMA 的机器,它还会包含为容器保留的内存和大页的信息。
341343

342344
```gRPC
343345
// ListPodResourcesResponse 是 List 函数的响应
@@ -357,6 +359,14 @@ message ContainerResources {
357359
string name = 1;
358360
repeated ContainerDevices devices = 2;
359361
repeated int64 cpu_ids = 3;
362+
repeated ContainerMemory memory = 4;
363+
}
364+
365+
// ContainerMemory 包含分配给容器的内存和大页信息
366+
message ContainerMemory {
367+
string memory_type = 1;
368+
uint64 size = 2;
369+
TopologyInfo topology = 3;
360370
}
361371
362372
// Topology 描述资源的硬件拓扑结构
@@ -390,14 +400,15 @@ It provides more information than kubelet exports to APIServer.
390400
message AllocatableResourcesResponse {
391401
repeated ContainerDevices devices = 1;
392402
repeated int64 cpu_ids = 2;
403+
repeated ContainerMemory memory = 3;
393404
}
394405
395406
```
396407

397408
<!--
398409
`ContainerDevices` do expose the topology information declaring to which NUMA cells the device is affine.
399410
The NUMA cells are identified using a opaque integer ID, which value is consistent to what device
400-
plugins report [when they register themselves to the kubelet](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager).
411+
plugins report [when they register themselves to the kubelet](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager).
401412
-->
402413
`ContainerDevices` 会向外提供各个设备所隶属的 NUMA 单元这类拓扑信息。
403414
NUMA 单元通过一个整数 ID 来标识,其取值与设备插件所报告的一致。

content/zh/docs/concepts/extend-kubernetes/operator.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ Some of the things that you can use an operator to automate include:
9898
* 在没有内部成员选举程序的情况下,为分布式应用选择首领角色
9999

100100
<!--
101-
What might an Operator look like in more detail? Here's an example in more
102-
detail:
101+
What might an Operator look like in more detail? Here's an example:
103102
104103
1. A custom resource named SampleDB, that you can configure into the cluster.
105104
2. A Deployment that makes sure a Pod is running that contains the
@@ -124,7 +123,7 @@ detail:
124123
creates Job objects that upgrade it for you.
125124
-->
126125

127-
想要更详细的了解 Operator?这儿有一个详细的示例
126+
想要更详细的了解 Operator?下面是一个示例
128127

129128
1. 有一个名为 SampleDB 的自定义资源,你可以将其配置到集群中。
130129
2. 一个包含 Operator 控制器部分的 Deployment,用来确保 Pod 处于运行状态。
@@ -216,8 +215,8 @@ Operator.
216215
* [Charmed Operator Framework](https://juju.is/)
217216
* [kubebuilder](https://book.kubebuilder.io/)
218217
* [KUDO](https://kudo.dev/) (Kubernetes Universal Declarative Operator)
219-
* [Metacontroller](https://metacontroller.app/) along with WebHooks that
220-
you implement yourself
218+
* [Metacontroller](https://metacontroller.github.io/metacontroller/intro.html) along with WebHooks that
219+
you implement yourself
221220
* [Operator Framework](https://operatorframework.io)
222221
* [shell-operator](https://github.com/flant/shell-operator)
223222
-->
@@ -228,20 +227,22 @@ Operator.
228227
* [Charmed Operator Framework](https://juju.is/)
229228
* [kubebuilder](https://book.kubebuilder.io/)
230229
* [KUDO](https://kudo.dev/) (Kubernetes 通用声明式 Operator)
231-
* [Metacontroller](https://metacontroller.app/),可与 Webhooks 结合使用,以实现自己的功能。
230+
* [Metacontroller](https://metacontroller.github.io/metacontroller/intro.html),可与 Webhooks 结合使用,以实现自己的功能。
232231
* [Operator Framework](https://operatorframework.io)
233232
* [shell-operator](https://github.com/flant/shell-operator)
234233

235234
## {{% heading "whatsnext" %}}
236235

237236
<!--
237+
* Read the {{< glossary_tooltip text="CNCF" term_id="cncf" >}} [Operator White Paper](https://github.com/cncf/tag-app-delivery/blob/eece8f7307f2970f46f100f51932db106db46968/operator-wg/whitepaper/Operator-WhitePaper_v1-0.md).
238238
* Learn more about [Custom Resources](/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
239239
* Find ready-made operators on [OperatorHub.io](https://operatorhub.io/) to suit your use case
240240
* [Publish](https://operatorhub.io/) your operator for other people to use
241241
* Read [CoreOS' original article](https://web.archive.org/web/20170129131616/https://coreos.com/blog/introducing-operators.html) that introduced the Operator pattern (this is an archived version of the original article).
242242
* Read an [article](https://cloud.google.com/blog/products/containers-kubernetes/best-practices-for-building-kubernetes-operators-and-stateful-apps) from Google Cloud about best practices for building Operators
243243
-->
244244

245+
* 阅读 {{< glossary_tooltip text="CNCF" term_id="cncf" >}} [Operator 白皮书](https://github.com/cncf/tag-app-delivery/blob/eece8f7307f2970f46f100f51932db106db46968/operator-wg/whitepaper/Operator-WhitePaper_v1-0.md)
245246
* 详细了解 [定制资源](/zh/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
246247
*[OperatorHub.io](https://operatorhub.io/) 上找到现成的、适合你的 Operator
247248
* [发布](https://operatorhub.io/)你的 Operator,让别人也可以使用

0 commit comments

Comments
 (0)