Skip to content

Commit ab1a4a4

Browse files
authored
Merge pull request #43653 from windsonsea/comdef
[zh] Clean up kubernetes-api/common-definitions/ files
2 parents cdb1e28 + ed70f0d commit ab1a4a4

File tree

5 files changed

+69
-142
lines changed

5 files changed

+69
-142
lines changed

content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-field-selector.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,29 @@ content_type: "api_reference"
77
description: "ObjectFieldSelector 选择对象的 APIVersioned 字段。"
88
title: "ObjectFieldSelector"
99
weight: 6
10-
auto_generated: true
1110
---
12-
1311
<!--
14-
The file is auto-generated from the Go source code of the component using a generic
15-
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
16-
to generate the reference documentation, please read
17-
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
18-
To update the reference content, please follow the
19-
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
20-
guide. You can file document formatting bugs against the
21-
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
12+
api_metadata:
13+
apiVersion: ""
14+
import: "k8s.io/api/core/v1"
15+
kind: "ObjectFieldSelector"
16+
content_type: "api_reference"
17+
description: "ObjectFieldSelector selects an APIVersioned field of an object."
18+
title: "ObjectFieldSelector"
19+
weight: 6
20+
auto_generated: true
2221
-->
2322

24-
25-
2623
`import "k8s.io/api/core/v1"`
2724

2825
<!--
2926
ObjectFieldSelector selects an APIVersioned field of an object.
3027
-->
3128
ObjectFieldSelector 选择对象的 APIVersioned 字段。
32-
<!--
29+
3330
<hr>
3431

32+
<!--
3533
- **fieldPath** (string), required
3634
3735
Path of the field to select in the specified API version.
@@ -40,15 +38,10 @@ ObjectFieldSelector 选择对象的 APIVersioned 字段。
4038
4139
Version of the schema the FieldPath is written in terms of, defaults to "v1".
4240
-->
43-
<hr>
44-
45-
46-
- **fieldPath** (string),必需的
41+
- **fieldPath** (string),必需
4742

4843
在指定 API 版本中要选择的字段的路径。
4944

5045
- **apiVersion** (string)
5146

5247
`fieldPath` 写入时所使用的模式版本,默认为 "v1"。
53-
54-

content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-reference.md

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ content_type: "api_reference"
77
description: "ObjectReference 包含足够的信息,可以让你检查或修改引用的对象。"
88
title: "ObjectReference"
99
weight: 8
10-
auto_generated: true
1110
---
1211
<!--
1312
api_metadata:
@@ -21,32 +20,15 @@ weight: 8
2120
auto_generated: true
2221
-->
2322

24-
<!--
25-
The file is auto-generated from the Go source code of the component using a generic
26-
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
27-
to generate the reference documentation, please read
28-
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
29-
To update the reference content, please follow the
30-
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
31-
guide. You can file document formatting bugs against the
32-
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
33-
-->
34-
35-
36-
3723
`import "k8s.io/api/core/v1"`
3824

3925
<!--
4026
ObjectReference contains enough information to let you inspect or modify the referred object.
41-
42-
<hr>
4327
-->
44-
45-
ObjectReference包含足够的信息,允许你检查或修改引用的对象。
28+
ObjectReference 包含足够的信息,允许你检查或修改引用的对象。
4629

4730
<hr>
4831

49-
5032
<!--
5133
- **apiVersion** (string)
5234
@@ -55,28 +37,7 @@ ObjectReference包含足够的信息,允许你检查或修改引用的对象
5537
- **fieldPath** (string)
5638
5739
If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.
58-
59-
- **kind** (string)
60-
61-
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
62-
63-
- **name** (string)
64-
65-
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
66-
67-
- **namespace** (string)
68-
69-
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
70-
71-
- **resourceVersion** (string)
72-
73-
Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
74-
75-
- **uid** (string)
76-
77-
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
7840
-->
79-
8041
- **apiVersion** (string)
8142

8243
被引用者的 API 版本。
@@ -89,23 +50,49 @@ ObjectReference包含足够的信息,允许你检查或修改引用的对象
8950
或者如果没有指定容器名称,`spec.containers[ 2 ]`(此 Pod 中索引为 2 的容器)。
9051
选择这种只是为了有一些定义好的语法来引用对象的部分。
9152

53+
<!--
54+
- **kind** (string)
55+
56+
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
57+
58+
- **name** (string)
59+
60+
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
61+
62+
- **namespace** (string)
63+
64+
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
65+
-->
9266
- **kind** (string)
9367

94-
被引用者的类别(kind)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
68+
被引用者的类别(kind)。更多信息:
69+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
9570

9671
- **name** (string)
9772

98-
被引用对象的名称。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
73+
被引用对象的名称。更多信息:
74+
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names/#names
9975

10076
- **namespace** (string)
10177

102-
被引用对象的名字空间。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
78+
被引用对象的名字空间。更多信息:
79+
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/namespaces/
10380

81+
<!--
10482
- **resourceVersion** (string)
10583
106-
被引用对象的特定资源版本(如果有)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
84+
Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
10785
10886
- **uid** (string)
10987
110-
被引用对象的UID。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
88+
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
89+
-->
90+
- **resourceVersion** (string)
91+
92+
被引用对象的特定资源版本(如果有)。更多信息:
93+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
94+
95+
- **uid** (string)
11196

97+
被引用对象的 UID。更多信息:
98+
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names/#uids

content/zh-cn/docs/reference/kubernetes-api/common-definitions/patch.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ content_type: "api_reference"
77
description: "提供 Patch 是为了给 Kubernetes PATCH 请求正文提供一个具体的名称和类型。"
88
title: "Patch"
99
weight: 9
10-
auto_generated: true
1110
---
12-
1311
<!--
1412
api_metadata:
1513
apiVersion: ""
@@ -22,28 +20,11 @@ weight: 9
2220
auto_generated: true
2321
-->
2422

25-
<!--
26-
The file is auto-generated from the Go source code of the component using a generic
27-
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
28-
to generate the reference documentation, please read
29-
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
30-
To update the reference content, please follow the
31-
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
32-
guide. You can file document formatting bugs against the
33-
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
34-
-->
35-
36-
37-
3823
`import "k8s.io/apimachinery/pkg/apis/meta/v1"`
3924

40-
41-
<!-- Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. -->
25+
<!--
26+
Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
27+
-->
4228
提供 Patch 是为了给 Kubernetes PATCH 请求正文提供一个具体的名称和类型。
4329

4430
<hr>
45-
46-
47-
48-
49-

content/zh-cn/docs/reference/kubernetes-api/common-definitions/resource-field-selector.md

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ content_type: "api_reference"
77
description: "ResourceFieldSelector 表示容器资源(CPU,内存)及其输出格式。"
88
title: "ResourceFieldSelector"
99
weight: 11
10-
auto_generated: true
1110
---
12-
1311
<!--
1412
api_metadata:
1513
apiVersion: ""
@@ -22,41 +20,32 @@ weight: 11
2220
auto_generated: true
2321
-->
2422

25-
<!--
26-
The file is auto-generated from the Go source code of the component using a generic
27-
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
28-
to generate the reference documentation, please read
29-
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
30-
To update the reference content, please follow the
31-
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
32-
guide. You can file document formatting bugs against the
33-
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
34-
-->
35-
36-
37-
3823
`import "k8s.io/api/core/v1"`
3924

40-
41-
<!-- ResourceFieldSelector represents container resources (cpu, memory) and their output format -->
25+
<!--
26+
ResourceFieldSelector represents container resources (cpu, memory) and their output format
27+
-->
4228
ResourceFieldSelector 表示容器资源(CPU,内存)及其输出格式。
4329

4430
<hr>
4531

46-
- **resource** (string),必选
32+
- **resource** (string),必需
4733

48-
<!-- Required: resource to select -->
49-
必选:选择的资源
34+
<!--
35+
Required: resource to select
36+
-->
37+
必需:选择的资源。
5038

5139
- **containerName** (string)
5240

53-
<!-- Container name: required for volumes, optional for env vars -->
54-
容器名称:对卷必选,对环境变量可选
41+
<!--
42+
Container name: required for volumes, optional for env vars
43+
-->
44+
容器名称:对卷必需,对环境变量可选。
5545

5646
- **divisor** (<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
5747

58-
<!-- Specifies the output format of the exposed resources, defaults to "1" -->
59-
指定所曝光资源的输出格式,默认值为“1”
60-
61-
62-
48+
<!--
49+
Specifies the output format of the exposed resources, defaults to "1"
50+
-->
51+
指定所公开的资源的输出格式,默认值为 “1”。

content/zh-cn/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference.md

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ content_type: "api_reference"
77
description: "TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称空间中定位指定类型的引用对象。"
88
title: "TypedLocalObjectReference"
99
weight: 13
10-
auto_generated: true
1110
---
1211
<!--
13-
---
1412
api_metadata:
1513
apiVersion: ""
1614
import: "k8s.io/api/core/v1"
@@ -20,32 +18,18 @@ description: "TypedLocalObjectReference contains enough information to let you l
2018
title: "TypedLocalObjectReference"
2119
weight: 13
2220
auto_generated: true
23-
---
24-
-->
25-
26-
<!--
27-
The file is auto-generated from the Go source code of the component using a generic
28-
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
29-
to generate the reference documentation, please read
30-
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
31-
To update the reference content, please follow the
32-
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
33-
guide. You can file document formatting bugs against the
34-
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
3521
-->
3622

37-
38-
3923
`import "k8s.io/api/core/v1"`
4024

4125
<!--
4226
TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
4327
-->
44-
4528
TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称空间中定位特定类型的引用对象。
46-
<!--
29+
4730
<hr>
4831

32+
<!--
4933
- **kind** (string), required
5034
5135
Kind is the type of resource being referenced
@@ -58,22 +42,15 @@ TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称
5842
5943
APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
6044
-->
61-
62-
<hr>
63-
6445
- **kind** (string),必需
6546

66-
Kind 是被引用的资源的类型
47+
kind 是被引用的资源的类型
6748

6849
- **name** (string),必需
6950

70-
Name 是被引用的资源的名称
51+
name 是被引用的资源的名称
7152

7253
- **apiGroup** (string)
7354

74-
APIGroup 是被引用资源的组。如果不指定 APIGroup,则指定的 Kind 必须在核心 API 组中。对于任何其它第三方类型,都需要 APIGroup。
75-
76-
77-
78-
79-
55+
apiGroup 是被引用资源的组。如果不指定 apiGroup,则指定的 kind 必须在核心 API 组中。
56+
对于任何其它第三方类型,都需要 apiGroup。

0 commit comments

Comments
 (0)