Skip to content

Commit ed0a8bc

Browse files
authored
Merge pull request #48227 from windsonsea/ragecla
[zh] Sync config-and-storage-resources/storage-class-v1.md
2 parents c39e485 + 6bf10e8 commit ed0a8bc

File tree

1 file changed

+80
-22
lines changed

1 file changed

+80
-22
lines changed

content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/storage-class-v1.md

Lines changed: 80 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ api_metadata:
66
content_type: "api_reference"
77
description: "StorageClass 为可以动态制备 PersistentVolume 的存储类描述参数。"
88
title: "StorageClass"
9-
weight: 6
9+
weight: 8
1010
---
1111
<!--
1212
api_metadata:
@@ -16,14 +16,16 @@ api_metadata:
1616
content_type: "api_reference"
1717
description: "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned."
1818
title: "StorageClass"
19-
weight: 6
19+
weight: 8
20+
auto_generated: true
2021
-->
2122

2223
`apiVersion: storage.k8s.io/v1`
2324

2425
`import "k8s.io/api/storage/v1"`
2526

2627
## StorageClass {#StorageClass}
28+
2729
<!--
2830
StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.
2931
@@ -41,13 +43,16 @@ StorageClass 是不受名字空间作用域限制的;按照 etcd 设定的存
4143

4244
<!--
4345
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
46+
4447
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
4548
4649
- **provisioner** (string), required
50+
4751
provisioner indicates the type of the provisioner.
4852
4953
- **allowVolumeExpansion** (boolean)
50-
allowVolumeExpansion shows whether the storage class allow volume expand
54+
55+
allowVolumeExpansion shows whether the storage class allow volume expand.
5156
-->
5257
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
5358

@@ -64,6 +69,7 @@ StorageClass 是不受名字空间作用域限制的;按照 etcd 设定的存
6469

6570
<!--
6671
- **allowedTopologies** ([]TopologySelectorTerm)
72+
6773
*Atomic: will be replaced during a merge*
6874
6975
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
@@ -79,50 +85,70 @@ StorageClass 是不受名字空间作用域限制的;按照 etcd 设定的存
7985
空的 TopologySelectorTerm 列表意味着没有拓扑限制。
8086
只有启用 VolumeScheduling 功能特性的服务器才能使用此字段。
8187

82-
<a name="TopologySelectorTerm"></a>
88+
<a name="TopologySelectorTerm"></a>
8389
**拓扑选择器条件表示标签查询的结果。
8490
一个 null 或空的拓扑选择器条件不会匹配任何对象。各个条件的要求按逻辑与的关系来计算。
85-
此选择器作为 NodeSelectorTerm 所提供功能的子集。此功能为 Alpha 特性,将来可能会变更。**
91+
此选择器作为 NodeSelectorTerm 所提供功能的子集。这是一个 Alpha 特性,将来可能会变更。**
8692

87-
<!--
93+
<!--
8894
- **allowedTopologies.matchLabelExpressions** ([]TopologySelectorLabelRequirement)
95+
96+
*Atomic: will be replaced during a merge*
97+
8998
A list of topology selector requirements by labels.
99+
90100
<a name="TopologySelectorLabelRequirement"></a>
91101
*A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.*
102+
-->
103+
104+
- **allowedTopologies.matchLabelExpressions** ([]TopologySelectorLabelRequirement)
105+
106+
**原子性:将在合并期间被替换**
107+
108+
按标签设置的拓扑选择器要求的列表。
109+
110+
<a name="TopologySelectorLabelRequirement"></a>
111+
**拓扑选择器要求是与给定标签匹配的一个选择器。这是一个 Alpha 特性,将来可能会变更。**
92112

113+
<!--
93114
- **allowedTopologies.matchLabelExpressions.key** (string), required
115+
94116
The label key that the selector applies to.
117+
95118
- **allowedTopologies.matchLabelExpressions.values** ([]string), required
119+
120+
*Atomic: will be replaced during a merge*
121+
96122
An array of string values. One value must match the label to be selected. Each entry in Values is ORed.
97-
-->
98-
- **allowedTopologies.matchLabelExpressions** ([]TopologySelectorLabelRequirement)
123+
-->
99124

100-
按标签设置的拓扑选择器要求的列表。
101-
102-
<a name="TopologySelectorLabelRequirement"></a>
103-
**拓扑选择器要求是与给定标签匹配的一个选择器。此功能为 Alpha 特性,将来可能会变更。**
104-
105125
- **allowedTopologies.matchLabelExpressions.key** (string),必需
106126

107127
选择器所针对的标签键。
108-
128+
109129
- **allowedTopologies.matchLabelExpressions.values** ([]string),必需
110130

111-
字符串数组。一个值必须与要选择的标签匹配。values 中的每个条目按逻辑或的关系来计算。
131+
**原子性:将在合并期间被替换**
132+
133+
字符串值的数组。一个值必须与要选择的标签匹配。values 中的每个条目按逻辑或的关系来计算。
112134

113135
<!--
114136
- **mountOptions** ([]string)
115137
138+
*Atomic: will be replaced during a merge*
139+
116140
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
117141
118142
- **parameters** (map[string]string)
143+
119144
parameters holds the parameters for the provisioner that should create volumes of this storage class.
120145
-->
121146
- **mountOptions** ([]string)
122147

123-
mountOptions 控制此存储类动态制备的 PersistentVolume 的挂载配置。
124-
(例如 ["ro", "soft"])。
125-
系统对选项作检查——如果有一个选项无效,则这些 PV 的挂载将失败。
148+
**原子性:将在合并期间被替换**
149+
150+
mountOptions 控制此存储类动态制备的 PersistentVolume 的挂载配置,例如 ["ro", "soft"]
151+
针对此字段无合法性检查 —— 如果有一个选项无效,则这些 PV 的挂载将失败。
126152

127153
- **parameters** (map[string]string)
128154

@@ -134,6 +160,7 @@ StorageClass 是不受名字空间作用域限制的;按照 etcd 设定的存
134160
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.
135161
136162
- **volumeBindingMode** (string)
163+
137164
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
138165
-->
139166
- **reclaimPolicy** (string)
@@ -147,6 +174,7 @@ StorageClass 是不受名字空间作用域限制的;按照 etcd 设定的存
147174
只有启用 VolumeScheduling 功能特性的服务器才能使用此字段。
148175

149176
## StorageClassList {#StorageClassList}
177+
150178
<!--
151179
StorageClassList is a collection of storage classes.
152180
-->
@@ -160,9 +188,11 @@ StorageClassList 是存储类的集合。
160188

161189
<!--
162190
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
191+
163192
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
164193
165194
- **items** ([]<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>), required
195+
166196
items is the list of StorageClasses
167197
-->
168198
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
@@ -184,7 +214,9 @@ StorageClassList 是存储类的集合。
184214
<hr>
185215

186216
### `get` 读取指定的 StorageClass
217+
187218
#### HTTP 请求
219+
188220
GET /apis/storage.k8s.io/v1/storageclasses/{name}
189221

190222
<!--
@@ -194,9 +226,10 @@ GET /apis/storage.k8s.io/v1/storageclasses/{name}
194226
- **pretty** (*in query*): string
195227
-->
196228
#### 参数
229+
197230
- **name** (**路径参数**): string,必需
198231

199-
StorageClass 的名称
232+
StorageClass 的名称
200233

201234
- **pretty** (**查询参数**): string
202235

@@ -206,6 +239,7 @@ GET /apis/storage.k8s.io/v1/storageclasses/{name}
206239
#### Response
207240
-->
208241
#### 响应
242+
209243
200 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): OK
210244

211245
401: Unauthorized
@@ -215,7 +249,9 @@ GET /apis/storage.k8s.io/v1/storageclasses/{name}
215249
#### HTTP Request
216250
-->
217251
### `list` 列出或观测类别为 StorageClass 的对象
252+
218253
#### HTTP 请求
254+
219255
GET /apis/storage.k8s.io/v1/storageclasses
220256

221257
<!--
@@ -232,6 +268,7 @@ GET /apis/storage.k8s.io/v1/storageclasses
232268
- **watch** (*in query*): boolean
233269
-->
234270
#### 参数
271+
235272
- **allowWatchBookmarks** (**查询参数**): boolean
236273

237274
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a>
@@ -280,6 +317,7 @@ GET /apis/storage.k8s.io/v1/storageclasses
280317
#### Response
281318
-->
282319
#### 响应
320+
283321
200 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClassList" >}}">StorageClassList</a>): OK
284322

285323
401: Unauthorized
@@ -289,7 +327,9 @@ GET /apis/storage.k8s.io/v1/storageclasses
289327
#### HTTP Request
290328
-->
291329
### `create` 创建 StorageClass
330+
292331
#### HTTP 请求
332+
293333
POST /apis/storage.k8s.io/v1/storageclasses
294334

295335
<!--
@@ -301,6 +341,7 @@ POST /apis/storage.k8s.io/v1/storageclasses
301341
- **pretty** (*in query*): string
302342
-->
303343
#### 参数
344+
304345
- **body**: <a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>,必需
305346

306347
- **dryRun** (**查询参数**): string
@@ -323,6 +364,7 @@ POST /apis/storage.k8s.io/v1/storageclasses
323364
#### Response
324365
-->
325366
#### 响应
367+
326368
200 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): OK
327369

328370
201 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): Created
@@ -336,7 +378,9 @@ POST /apis/storage.k8s.io/v1/storageclasses
336378
#### HTTP Request
337379
-->
338380
### `update` 替换指定的 StorageClass
381+
339382
#### HTTP 请求
383+
340384
PUT /apis/storage.k8s.io/v1/storageclasses/{name}
341385

342386
<!--
@@ -350,9 +394,10 @@ PUT /apis/storage.k8s.io/v1/storageclasses/{name}
350394
- **pretty** (*in query*): string
351395
-->
352396
#### 参数
397+
353398
- **name** (**路径参数**): string,必需
354399

355-
StorageClass 的名称
400+
StorageClass 的名称
356401

357402
- **body**: <a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>,必需
358403

@@ -376,6 +421,7 @@ PUT /apis/storage.k8s.io/v1/storageclasses/{name}
376421
#### Response
377422
-->
378423
#### 响应
424+
379425
200 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): OK
380426

381427
201 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): Created
@@ -387,7 +433,9 @@ PUT /apis/storage.k8s.io/v1/storageclasses/{name}
387433
#### HTTP Request
388434
-->
389435
### `patch` 部分更新指定的 StorageClass
436+
390437
#### HTTP 请求
438+
391439
PATCH /apis/storage.k8s.io/v1/storageclasses/{name}
392440

393441
<!--
@@ -402,9 +450,10 @@ PATCH /apis/storage.k8s.io/v1/storageclasses/{name}
402450
- **pretty** (*in query*): string
403451
-->
404452
#### 参数
453+
405454
- **name** (**路径参数**): string,必需
406455

407-
StorageClass 的名称
456+
StorageClass 的名称
408457

409458
- **body**: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a>,必需
410459

@@ -432,6 +481,7 @@ PATCH /apis/storage.k8s.io/v1/storageclasses/{name}
432481
#### Response
433482
-->
434483
#### 响应
484+
435485
200 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): OK
436486

437487
201 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): Created
@@ -443,7 +493,9 @@ PATCH /apis/storage.k8s.io/v1/storageclasses/{name}
443493
#### HTTP Request
444494
-->
445495
### `delete` 删除 StorageClass
496+
446497
#### HTTP 请求
498+
447499
DELETE /apis/storage.k8s.io/v1/storageclasses/{name}
448500

449501
<!--
@@ -457,9 +509,10 @@ DELETE /apis/storage.k8s.io/v1/storageclasses/{name}
457509
- **propagationPolicy** (*in query*): string
458510
-->
459511
#### 参数
512+
460513
- **name** (**路径参数**): string,必需
461514

462-
StorageClass 的名称
515+
StorageClass 的名称
463516

464517
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
465518

@@ -483,6 +536,7 @@ DELETE /apis/storage.k8s.io/v1/storageclasses/{name}
483536
#### Response
484537
-->
485538
#### 响应
539+
486540
200 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): OK
487541

488542
202 (<a href="{{< ref "../config-and-storage-resources/storage-class-v1#StorageClass" >}}">StorageClass</a>): Accepted
@@ -494,7 +548,9 @@ DELETE /apis/storage.k8s.io/v1/storageclasses/{name}
494548
#### HTTP Request
495549
-->
496550
### `deletecollection` 删除 StorageClass 的集合
551+
497552
#### HTTP 请求
553+
498554
DELETE /apis/storage.k8s.io/v1/storageclasses
499555

500556
<!--
@@ -513,6 +569,7 @@ DELETE /apis/storage.k8s.io/v1/storageclasses
513569
- **timeoutSeconds** (*in query*): integer
514570
-->
515571
#### 参数
572+
516573
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
517574

518575
- **continue** (**查询参数**): string
@@ -567,6 +624,7 @@ DELETE /apis/storage.k8s.io/v1/storageclasses
567624
#### Response
568625
-->
569626
#### 响应
627+
570628
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status</a>): OK
571629

572630
401: Unauthorized

0 commit comments

Comments
 (0)