Skip to content

Commit 7c81934

Browse files
committed
[zh] Clean up /kubernetes-api/common-definitions files
1 parent 2f669e5 commit 7c81934

File tree

4 files changed

+47
-75
lines changed

4 files changed

+47
-75
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
title: "公共定义"
33
weight: 9
44
---
5-
5+

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

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ content_type: "api_reference"
77
description: "删除 API 对象时可以提供 DeleteOptions。"
88
title: "DeleteOptions"
99
weight: 1
10-
auto_generated: true
1110
---
12-
1311
25+
2828
删除 API 对象时可以提供 DeleteOptions。
2929

3030
<hr>
@@ -34,32 +34,29 @@ auto_generated: true
3434
3535
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
3636
-->
37-
3837
- **apiVersion** (string)
3938

4039
`APIVersion` 定义对象表示的版本化模式。
41-
服务器应将已识别的模式转换为最新的内部值,并可能拒绝无法识别的值。
42-
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
40+
服务器应将已识别的模式转换为最新的内部值,并可能拒绝无法识别的值。更多信息:
41+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
4342

4443
49-
5048
- **dryRun** ([]string)
5149

5250
该值如果存在,则表示不应保留修改。
5351
无效或无法识别的 `dryRun` 指令将导致错误响应并且不会进一步处理请求。有效值为:
5452

55-
- `All`:处理所有试运行阶段(Dry Run Stages)
53+
- `All`:处理所有试运行阶段(Dry Run Stages)
5654

5755
62-
6360
- **gracePeriodSeconds** (int64)
6461

6562
表示对象被删除之前的持续时间(以秒为单位)。
@@ -70,19 +67,17 @@ auto_generated: true
7067
7168
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
7269
-->
73-
7470
- **kind** (string)
7571

7672
`kind` 是一个字符串值,表示此对象代表的 REST 资源。
77-
服务器可以从客户端提交请求的端点推断出此值。此值无法更新,是驼峰的格式。
78-
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
73+
服务器可以从客户端提交请求的端点推断出此值。此值无法更新,是驼峰的格式。更多信息:
74+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
7975

8076
85-
8681
- **orphanDependents** (boolean)
8782

8883
已弃用:该字段将在 1.7 中弃用,请使用 `propagationPolicy` 字段。
@@ -105,13 +100,12 @@ auto_generated: true
105100
106101
Specifies the target UID.
107102
-->
108-
109103
- **preconditions** (Preconditions)
110104

111105
先决条件必须在执行删除之前完成。如果无法满足这些条件,将返回 409(冲突)状态。
112106

113107
<a name="Preconditions">a>
114-
*执行操作(更新、删除等)之前必须满足先决条件。*
108+
**执行操作(更新、删除等)之前必须满足先决条件。**
115109

116110
- **preconditions.resourceVersion** (string)
117111

@@ -126,14 +120,8 @@ auto_generated: true
126120
127121
Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
128122
-->
129-
130123
- **propagationPolicy** (string)
131124

132125
表示是否以及如何执行垃圾收集。可以设置此字段或 `orphanDependents` 字段,但不能同时设置二者。
133126
默认策略由 `metadata.finalizers` 中现有终结器(Finalizer)集合和特定资源的默认策略决定。
134127
可接受的值为:`Orphan` - 令依赖对象成为孤儿对象;`Background` - 允许垃圾收集器在后台删除依赖项;`Foreground` - 一个级联策略,前台删除所有依赖项。
135-
136-
137-
138-
139-

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

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ content_type: "api_reference"
77
description: "标签选择器是对一组资源的标签查询。"
88
title: "LabelSelector"
99
weight: 2
10-
auto_generated: true
1110
---
12-
1311
2322

2423
`import "k8s.io/apimachinery/pkg/apis/meta/v1"`
2524

2625
29-
3028
标签选择器是对一组资源的标签查询。
31-
3229
`matchLabels``matchExpressions` 的结果按逻辑与的关系组合。
3330
一个 `empty` 标签选择器匹配所有对象。一个 `null` 标签选择器不匹配任何对象。
3431

3532
<hr>
3633

37-
34+
4642
- **matchExpressions** ([]LabelSelectorRequirement)
4743

48-
`matchExpressions` 是标签选择器要求的列表,这些要求的结果按逻辑与的关系来计算。
44+
`matchExpressions` 是标签选择器要求的列表,这些要求的结果按逻辑与的关系来计算。
4945

50-
<a name="LabelSelectorRequirement">a>
51-
*标签选择器要求是包含值、键和关联键和值的运算符的选择器。*
46+
<a name="LabelSelectorRequirement">a>
47+
**标签选择器要求是包含值、键和关联键和值的运算符的选择器。**
5248

53-
49+
54+
55+
- **matchExpressions.key** (string),必需
5956

6057
`key` 是选择器应用的标签键。
6158

62-
59+
6664

67-
- **matchExpressions.operator** (string),必填
65+
- **matchExpressions.operator** (string),必需
6866

6967
`operator` 表示键与一组值的关系。有效的运算符包括 `In``NotIn``Exists``DoesNotExist`
7068

@@ -77,27 +75,19 @@ A label selector is a label query over a set of resources. The result of matchLa
7775
- **matchExpressions.values** ([]string)
7876

7977
`values` 是一个字符串值数组。如果运算符为 `In``NotIn`,则 `values` 数组必须为非空。
80-
8178
如果运算符是 `Exists``DoesNotExist`,则 `values` 数组必须为空。
82-
8379
该数组在策略性合并补丁(Strategic Merge Patch)期间被替换。
8480

8581
86+
- **matchLabels** (map[string]string)
9087

91-
- **matchLabels** (map[string]string)
92-
93-
`matchLabels` 是 {`key`,`value`} 键值对的映射。
94-
95-
`matchLabels` 映射中的单个 {`key`,`value`} 键值对相当于 `matchExpressions` 的一个元素,其键字段为 `key`,运算符为 `In``values` 数组仅包含 `value`
96-
97-
所表达的需求最终要按逻辑与的关系组合。
98-
99-
100-
101-
102-
88+
`matchLabels` 是 {`key`,`value`} 键值对的映射。
10389

90+
`matchLabels` 映射中的单个 {`key`,`value`} 键值对相当于 `matchExpressions` 的一个元素,
91+
其键字段为 `key`,运算符为 `In``values` 数组仅包含 `value`
92+
93+
所表达的需求最终要按逻辑与的关系组合。

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

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ content_type: "api_reference"
77
description: "ListMeta 描述了合成资源必须具有的元数据,包括列表和各种状态对象。"
88
title: "ListMeta"
99
weight: 3
10-
auto_generated: true
1110
---
12-
1311
2422

25-
2623
`import "k8s.io/apimachinery/pkg/apis/meta/v1"`
2724

2825
41-
4238
- **continue** (string)
4339

4440
如果用户对返回的条目数量设置了限制,则 `continue` 可能被设置,表示服务器有更多可用的数据。
@@ -52,7 +48,6 @@ ListMeta describes metadata that synthetic resources must have, including lists
5248
5349
remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
5450
-->
55-
5651
- **remainingItemCount** (int64)
5752

5853
`remainingItemCount` 是列表中未包含在此列表响应中的后续项目的数量。
@@ -66,24 +61,19 @@ ListMeta describes metadata that synthetic resources must have, including lists
6661
6762
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
6863
-->
69-
7064
- **resourceVersion** (string)
7165

7266
标识该对象的服务器内部版本的字符串,客户端可以用该字段来确定对象何时被更改。
73-
该值对客户端是不透明的,并且应该原样传回给服务器。该值由系统填充,只读。
74-
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
67+
该值对客户端是不透明的,并且应该原样传回给服务器。该值由系统填充,只读。更多信息:
68+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
7569

7670
79-
8075
- **selfLink** (string)
8176

8277
selfLink 表示此对象的 URL,由系统填充,只读。
8378

8479
已弃用:selfLink 是一个遗留的只读字段,不再由系统填充。
85-
86-
87-
88-
89-

0 commit comments

Comments
 (0)