Skip to content

Commit 8ee064f

Browse files
authored
Merge pull request #43691 from windsonsea/statyh
[zh] Clean up /kubernetes-api/common-definitions/status.md
2 parents b2fc6be + faf9f9d commit 8ee064f

File tree

1 file changed

+69
-63
lines changed
  • content/zh-cn/docs/reference/kubernetes-api/common-definitions

1 file changed

+69
-63
lines changed

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

Lines changed: 69 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ content_type: "api_reference"
77
description: "状态(Status)是不返回其他对象的调用的返回值。"
88
title: "Status"
99
weight: 12
10-
auto_generated: true
1110
---
12-
1311
<!--
1412
api_metadata:
1513
apiVersion: ""
@@ -22,23 +20,11 @@ weight: 12
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-
<!-- Status is a return value for calls that don't return other objects. -->
25+
<!--
26+
Status is a return value for calls that don't return other objects.
27+
-->
4228
状态(Status)是不返回其他对象的调用的返回值。
4329

4430
<hr>
@@ -49,83 +35,92 @@ guide. You can file document formatting bugs against the
4935
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
5036
-->
5137

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

5642
- **code** (int32)
5743

58-
<!-- Suggested HTTP return code for this status, 0 if not set. -->
44+
<!--
45+
Suggested HTTP return code for this status, 0 if not set.
46+
-->
47+
5948
此状态的建议 HTTP 返回代码,如果未设置,则为 0。
6049

6150
- **details** (StatusDetails)
6251

6352
<!--
6453
Extended data associated with the reason. Each reason may define its own extended details.
6554
This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
55+
56+
<a name="StatusDetails"></a>
57+
*StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.*
6658
-->
59+
6760
与原因(Reason)相关的扩展数据。每个原因都可以定义自己的扩展细节。
6861
此字段是可选的,并且不保证返回的数据符合任何模式,除非由原因类型定义。
6962

7063
<a name="StatusDetails"></a>
71-
<!--
72-
*StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response.
73-
The Reason field of a Status object defines what attributes will be set.
74-
Clients must ignore fields that do not match the defined type of each attribute,
75-
and should assume that any attribute may be empty, invalid, or under defined.*
76-
-->
77-
*StatusDetails 是一组附加属性,可以由服务器设置以提供有关响应的附加信息。*
78-
*状态对象的原因字段定义将设置哪些属性。*
79-
*客户端必须忽略与每个属性的定义类型不匹配的字段,并且应该假定任何属性可能为空、无效或未定义。*
64+
**StatusDetails 是一组附加属性,可以由服务器设置以提供有关响应的附加信息。
65+
状态对象的原因字段定义将设置哪些属性。
66+
客户端必须忽略与每个属性的定义类型不匹配的字段,并且应该假定任何属性可能为空、无效或未定义。**
8067

8168
- **details.causes** ([]StatusCause)
8269

8370
<!--
8471
The Causes array includes more details associated with the StatusReason failure.
8572
Not all StatusReasons may provide detailed causes.
86-
-->
87-
Causes 数组包含与 StatusReason 故障相关的更多详细信息。
88-
并非所有 StatusReasons 都可以提供详细的原因。
8973
9074
<a name="StatusCause"></a>
91-
<!--
9275
*StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.*
9376
-->
94-
*StatusCause 提供有关 api.Status 失败的更多信息,包括遇到多个错误的情况。*
77+
78+
causes 数组包含与 StatusReason 故障相关的更多详细信息。
79+
并非所有 StatusReasons 都可以提供详细的原因。
80+
81+
<a name="StatusCause"></a>
82+
**StatusCause 提供有关 api.Status 失败的更多信息,包括遇到多个错误的情况。**
9583

9684
- **details.causes.field** (string)
9785

9886
<!--
99-
The field of the resource that has caused this error, as named by its JSON serialization.
100-
May include dot and postfix notation for nested attributes. Arrays are zero-indexed.
101-
Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
87+
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
88+
89+
Examples:
90+
"name" - the field "name" on the current resource
91+
"items[0].name" - the field "name" on the first array entry in "items"
10292
-->
93+
10394
导致此错误的资源字段,由其 JSON 序列化命名。
10495
可能包括嵌套属性的点和后缀表示法。数组是从零开始索引的。
10596
由于字段有多个错误,字段可能会在一系列原因中出现多次。可选。
10697

107-
<!--
108-
Examples:
109-
"name" - the field "name" on the current resource
110-
"items[0].name" - the field "name" on the first array entry in "items"
111-
-->
11298
示例:
11399
- “name”:当前资源上的字段 “name”
114100
- “items[0].name”:“items” 中第一个数组条目上的字段 “name”
115101

116102
- **details.causes.message** (string)
117103

118-
<!-- A human-readable description of the cause of the error. This field may be presented as-is to a reader. -->
104+
<!--
105+
A human-readable description of the cause of the error. This field may be presented as-is to a reader.
106+
-->
107+
119108
对错误原因的可读描述。该字段可以按原样呈现给读者。
120109

121110
- **details.causes.reason** (string)
122111

123-
<!-- A machine-readable description of the cause of the error. If this value is empty there is no information available. -->
112+
<!--
113+
A machine-readable description of the cause of the error. If this value is empty there is no information available.
114+
-->
115+
124116
错误原因的机器可读描述。如果此值为空,则没有可用信息。
125117

126118
- **details.group** (string)
127119

128-
<!-- The group attribute of the resource associated with the status StatusReason. -->
120+
<!--
121+
The group attribute of the resource associated with the status StatusReason.
122+
-->
123+
129124
与状态 StatusReason 关联的资源的组属性。
130125

131126
- **details.kind** (string)
@@ -135,13 +130,17 @@ guide. You can file document formatting bugs against the
135130
On some operations may differ from the requested resource Kind.
136131
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
137132
-->
138-
与状态 StatusReason 关联的资源的种类属性。
139-
在某些操作上可能与请求的资源种类不同。
133+
134+
与状态 StatusReason 关联的资源的类别属性。
135+
在某些操作上可能与请求的资源类别不同。
140136
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
141137

142138
- **details.name** (string)
143139

144-
<!-- The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). -->
140+
<!--
141+
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
142+
-->
143+
145144
与状态 StatusReason 关联的资源的名称属性(当有一个可以描述的名称时)。
146145

147146
- **details.retryAfterSeconds** (int32)
@@ -151,6 +150,7 @@ guide. You can file document formatting bugs against the
151150
Some errors may indicate the client must take an alternate action -
152151
for those errors this field may indicate how long to wait before taking the alternate action.
153152
-->
153+
154154
如果指定,则应重试操作前的时间(以秒为单位)。
155155
一些错误可能表明客户端必须采取替代操作——对于这些错误,此字段可能指示在采取替代操作之前等待多长时间。
156156

@@ -160,33 +160,37 @@ guide. You can file document formatting bugs against the
160160
UID of the resource. (when there is a single resource which can be described).
161161
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
162162
-->
163-
资源的 UID(当有单个可以描述的资源时)。
164-
更多信息: https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names#uids
163+
164+
资源的 UID(当有单个可以描述的资源时)。更多信息:
165+
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names#uids
165166

166167
- **kind** (string)
167168

168169
<!--
169-
Kind is a string value representing the REST resource this object represents.
170-
Servers may infer this from the endpoint the client submits requests to.
171-
Cannot be updated. In CamelCase.
172-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
170+
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
173171
-->
174-
Kind 是一个字符串值,表示此对象表示的 REST 资源。
172+
173+
kind 是一个字符串值,表示此对象表示的 REST 资源。
175174
服务器可以从客户端提交请求的端点推断出这一点。
176-
无法更新。驼峰式规则。
177-
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
175+
无法更新。驼峰式规则。更多信息:
176+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
178177

179178
- **message** (string)
180179

181-
<!-- A human-readable description of the status of this operation. -->
180+
<!--
181+
A human-readable description of the status of this operation.
182+
-->
183+
182184
此操作状态的人类可读描述。
183185

184186
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
185187

186-
<!-- Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds -->
187-
标准列表元数据。
188-
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
188+
<!--
189+
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
190+
-->
189191

192+
标准的列表元数据。更多信息:
193+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
190194

191195
- **reason** (string)
192196

@@ -195,14 +199,16 @@ guide. You can file document formatting bugs against the
195199
If this value is empty there is no information available.
196200
A Reason clarifies an HTTP status code but does not override it.
197201
-->
202+
198203
机器可读的说明,说明此操作为何处于“失败”状态。
199204
如果此值为空,则没有可用信息。
200-
Reason 澄清了 HTTP 状态代码,但不会覆盖它。
205+
reason 澄清了 HTTP 状态代码,但不会覆盖它。
201206

202207
- **status** (string)
203208

204209
<!--
205210
Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
206211
-->
207-
操作状态。“Success”或“Failure” 之一。
208-
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
212+
213+
操作状态。“Success”或“Failure” 之一。更多信息:
214+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

0 commit comments

Comments
 (0)