Skip to content

Commit 82a6333

Browse files
authored
Merge pull request #55648 from my-git9/npp-17127
[zh-cn]sync event-v1 lease-v1
2 parents 2ae8718 + 56c1643 commit 82a6333

2 files changed

Lines changed: 82 additions & 21 deletions

File tree

content/zh-cn/docs/reference/kubernetes-api/cluster-resources/event-v1.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ auto_generated: true
2626
`import "k8s.io/api/events/v1"`
2727

2828
## Event {#Event}
29+
2930
<!--
3031
Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
3132
Events have a limited retention time and triggers and messages may evolve with time.
@@ -48,7 +49,9 @@ Events 应被视为通知性质的、尽最大努力而提供的补充数据。
4849
<!--
4950
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
5051
-->
51-
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
52+
53+
标准的对象元数据。更多信息:
54+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
5255

5356
<!--
5457
- **eventTime** (MicroTime), required
@@ -58,7 +61,7 @@ Events 应被视为通知性质的、尽最大努力而提供的补充数据。
5861

5962
- **eventTime** (MicroTime),必需
6063

61-
evenTime 是该事件首次被观察到的时间。它是必需的。
64+
`evenTime` 是该事件首次被观察到的时间。它是必需的。
6265

6366
<a name="MicroTime"></a>
6467

@@ -73,50 +76,57 @@ Events 应被视为通知性质的、尽最大努力而提供的补充数据。
7376
<!--
7477
action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
7578
-->
76-
action 是针对相关对象所采取的或已失败的动作。字段值是机器可读的。对于新的 Event,此字段不能为空,
79+
80+
`action` 是针对相关对象所采取的或已失败的动作。字段值是机器可读的。对于新的 Event,此字段不能为空,
7781
且最多为 128 个字符。
7882

7983
- **deprecatedCount** (int32)
8084

8185
<!--
8286
deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
8387
-->
84-
deprecatedCount 是确保与 core.v1 Event 类型向后兼容的已弃用字段。
88+
89+
`deprecatedCount` 是确保与 `core.v1` Event 类型向后兼容的已弃用字段。
8590

8691
- **deprecatedFirstTimestamp** (Time)
8792

8893
<!--
8994
deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
9095
-->
91-
deprecatedFirstTimestamp 是确保与 core.v1 Event 类型向后兼容的已弃用字段。
96+
97+
`deprecatedFirstTimestamp` 是确保与 `core.v1` Event 类型向后兼容的已弃用字段。
9298

9399
<a name="Time"></a>
94100

95101
<!--
96102
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
97103
-->
104+
98105
**Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。**
99106

100107
- **deprecatedLastTimestamp** (Time)
101108

102109
<!--
103110
deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
104111
-->
105-
deprecatedLastTimestamp 是确保与 core.v1 Event 类型向后兼容的已弃用字段。
112+
113+
`deprecatedLastTimestamp` 是确保与 `core.v1` Event 类型向后兼容的已弃用字段。
106114

107115
<a name="Time"></a>
108116

109117
<!--
110118
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
111119
-->
120+
112121
**Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。**
113122

114123
- **deprecatedSource** (EventSource)
115124

116125
<!--
117126
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
118127
-->
119-
deprecatedSource 是确保与 core.v1 Event 类型向后兼容的已弃用字段。
128+
129+
`deprecatedSource` 是确保与 `core.v1` Event 类型向后兼容的已弃用字段。
120130

121131
<a name="EventSource"></a>
122132

@@ -147,20 +157,23 @@ Events 应被视为通知性质的、尽最大努力而提供的补充数据。
147157
<!--
148158
note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
149159
-->
150-
note 是对该操作状态的可读描述。注释的最大长度是 1kB,但是库应该准备好处理最多 64kB 的值。
160+
161+
`note` 是对该操作状态的可读描述。注释的最大长度是 1kB,但是库应该准备好处理最多 64kB 的值。
151162

152163
- **reason** (string)
153164

154165
<!--
155166
reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
156167
-->
157-
reason 是采取行动的原因。它是人类可读的。对于新的 Event,此字段不能为空,且最多为128个字符。
168+
169+
`reason` 是采取行动的原因。它是人类可读的。对于新的 Event,此字段不能为空,且最多为128个字符。
158170

159171
- **regarding** (<a href="{{< ref "../common-definitions/object-reference#ObjectReference" >}}">ObjectReference</a>)
160172

161173
<!--
162174
regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
163175
-->
176+
164177
关于包含此 Event 所涉及的对象。在大多数情况下,所指的是报告事件的控制器所实现的一个 Object。
165178
例如 ReplicaSetController 实现了 ReplicaSet,这个事件被触发是因为控制器对 ReplicaSet 对象做了一些变化。
166179

@@ -169,7 +182,8 @@ Events 应被视为通知性质的、尽最大努力而提供的补充数据。
169182
<!--
170183
related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
171184
-->
172-
related 是用于更复杂操作的、可选的、从属性的对象。例如,当 regarding 对象触发 related 对象的创建或删除时。
185+
186+
`related` 是用于更复杂操作的、可选的、从属性的对象。例如,当 regarding 对象触发 related 对象的创建或删除时。
173187

174188
- **reportingController** (string)
175189

@@ -183,7 +197,8 @@ Events 应被视为通知性质的、尽最大努力而提供的补充数据。
183197
<!--
184198
reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
185199
-->
186-
reportingInstance 为控制器实例的 ID,例如 `kubelet-xyzf`。对于新的 Event,此字段不能为空,且最多为 128 个字符。
200+
201+
`reportingInstance` 为控制器实例的 ID,例如 `kubelet-xyzf`。对于新的 Event,此字段不能为空,且最多为 128 个字符。
187202

188203
- **series** (EventSeries)
189204

@@ -410,6 +425,13 @@ GET /apis/events.k8s.io/v1/namespaces/{namespace}/events
410425

411426
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
412427

428+
<!--
429+
- **shardSelector** (*in query*): string
430+
-->
431+
- **shardSelector** (**查询参数**): string
432+
433+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
434+
413435
<!--
414436
- **timeoutSeconds** (*in query*): integer
415437
-->
@@ -512,6 +534,13 @@ GET /apis/events.k8s.io/v1/events
512534

513535
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
514536

537+
<!--
538+
- **shardSelector** (*in query*): string
539+
-->
540+
- **shardSelector** (**查询参数**): string
541+
542+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
543+
515544
<!--
516545
- **timeoutSeconds** (*in query*): integer
517546
-->
@@ -952,6 +981,13 @@ DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events
952981

953982
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
954983

984+
<!--
985+
- **shardSelector** (*in query*): string
986+
-->
987+
- **shardSelector** (**查询参数**): string
988+
989+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
990+
955991
<!--
956992
- **timeoutSeconds** (*in query*): integer
957993
-->

content/zh-cn/docs/reference/kubernetes-api/cluster-resources/lease-v1.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Lease 定义了租约的概念。
5353

5454
- **spec** (<a href="{{< ref "../cluster-resources/lease-v1#LeaseSpec" >}}">LeaseSpec</a>)
5555

56-
spec 包含 Lease 的规约。更多信息:
56+
`spec` 包含 Lease 的规约。更多信息:
5757
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
5858

5959
## LeaseSpec {#LeaseSpec}
@@ -79,14 +79,14 @@ LeaseSpec 是 Lease 的规约。
7979
-->
8080
- **acquireTime** (MicroTime)
8181

82-
acquireTime 是当前租约被获取的时间。
82+
`acquireTime` 是当前租约被获取的时间。
8383

8484
<a name="MicroTime"></a>
8585
**MicroTime 是微秒级精确时间的版本。**
8686

8787
- **holderIdentity** (string)
8888

89-
holderIdentity 包含当前租约持有人的身份。
89+
`holderIdentity` 包含当前租约持有人的身份。
9090
如果使用协调领导者选举(Coordinated Leader Election),
9191
则持有人身份必须等于选举出的 LeaseCandidate.metadata.name 字段。
9292

@@ -105,16 +105,16 @@ LeaseSpec 是 Lease 的规约。
105105
-->
106106
- **leaseDurationSeconds** (int32)
107107

108-
leaseDurationSeconds 是租约候选人需要等待强制获取租约的持续时间。
109-
这是相对于上次观察到的 renewTime 的度量。
108+
`leaseDurationSeconds` 是租约候选人需要等待强制获取租约的持续时间。
109+
这是相对于上次观察到的 `renewTime` 的度量。
110110

111111
- **leaseTransitions** (int32)
112112

113-
leaseTransitions 是租约持有人之间的转换次数。
113+
`leaseTransitions` 是租约持有人之间的转换次数。
114114

115115
- **preferredHolder** (string)
116116

117-
preferredHolder 向租约持有人发出信号,提示此租约出现一个更优的持有人且应该被放弃。
117+
`preferredHolder` 向租约持有人发出信号,提示此租约出现一个更优的持有人且应该被放弃。
118118
此字段仅在设置了 `strategy` 时才能被设置。
119119

120120
<!--
@@ -131,14 +131,14 @@ LeaseSpec 是 Lease 的规约。
131131
-->
132132
- **renewTime** (MicroTime)
133133

134-
renewTime 是当前租约持有人上次更新租约的时间。
134+
`renewTime` 是当前租约持有人上次更新租约的时间。
135135

136136
<a name="MicroTime"></a>
137137
**MicroTime 是具有微秒级精度的时间版本。**
138138

139139
- **strategy**(字符串)
140140

141-
strategy 指示为协调领导者选举选择领导者的策略。
141+
`strategy` 指示为协调领导者选举选择领导者的策略。
142142
如果此字段未被指定,则此租约没有主动的协调。
143143
(Alpha)使用此字段需要启用 CoordinatedLeaderElection 特性门控。
144144

@@ -160,6 +160,7 @@ LeaseList 是 Lease 对象的列表。
160160
<!--
161161
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
162162
-->
163+
163164
标准的列表元数据。更多信息:
164165
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
165166

@@ -170,7 +171,7 @@ LeaseList 是 Lease 对象的列表。
170171
-->
171172
- **items** ([]<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease</a>),必需
172173

173-
items 是架构对象的列表。
174+
`items` 是架构对象的列表。
174175

175176
<!--
176177
## Operations {#Operations}
@@ -282,6 +283,10 @@ GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
282283
283284
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
284285
286+
- **shardSelector** (*in query*): string
287+
288+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
289+
285290
- **timeoutSeconds** (*in query*): integer
286291
287292
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
@@ -332,6 +337,10 @@ GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
332337

333338
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
334339

340+
- **shardSelector** (**查询参数**): string
341+
342+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
343+
335344
- **timeoutSeconds** (**查询参数**): integer
336345

337346
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
@@ -399,6 +408,10 @@ GET /apis/coordination.k8s.io/v1/leases
399408
400409
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
401410
411+
- **shardSelector** (*in query*): string
412+
413+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
414+
402415
- **timeoutSeconds** (*in query*): integer
403416
404417
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
@@ -445,6 +458,10 @@ GET /apis/coordination.k8s.io/v1/leases
445458

446459
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
447460

461+
- **shardSelector** (**查询参数**): string
462+
463+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
464+
448465
- **timeoutSeconds** (**查询参数**): integer
449466

450467
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
@@ -856,6 +873,10 @@ DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
856873
857874
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
858875
876+
- **shardSelector** (*in query*): string
877+
878+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
879+
859880
- **timeoutSeconds** (*in query*): integer
860881
861882
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
@@ -916,6 +937,10 @@ DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
916937

917938
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
918939

940+
- **shardSelector** (**查询参数**): string
941+
942+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
943+
919944
- **timeoutSeconds** (**查询参数**): integer
920945

921946
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>

0 commit comments

Comments
 (0)