Skip to content

Commit

Permalink
[zh] resync page volume-attachment-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuzhenghao committed May 16, 2023
1 parent 6b3ef72 commit 9d48049
Showing 1 changed file with 65 additions and 38 deletions.
Expand Up @@ -41,10 +41,12 @@ VolumeAttachment 对象未划分命名空间。

<!--
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- **spec** (<a href="{{< ref "../config-and-storage-resources/volume-attachment-v1#VolumeAttachmentSpec" >}}">VolumeAttachmentSpec</a>), required
Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
spec represents specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
-->
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)

Expand All @@ -53,15 +55,16 @@ VolumeAttachment 对象未划分命名空间。

- **spec** (<a href="{{< ref "../config-and-storage-resources/volume-attachment-v1#VolumeAttachmentSpec" >}}">VolumeAttachmentSpec</a>),必需

期望的挂接/解除挂接卷行为的规约。由 Kubernetes 系统填充。
spec 表示期望的挂接/解除挂接卷行为的规约。由 Kubernetes 系统填充。

<!--
- **status** (<a href="{{< ref "../config-and-storage-resources/volume-attachment-v1#VolumeAttachmentStatus" >}}">VolumeAttachmentStatus</a>)
Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.
status represents status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.
-->
- **status** (<a href="{{< ref "../config-and-storage-resources/volume-attachment-v1#VolumeAttachmentStatus" >}}">VolumeAttachmentStatus</a>)

VolumeAttachment 请求的状态。由完成挂接或解除挂接操作的实体(即外部挂接器)进行填充。
status 表示 VolumeAttachment 请求的状态。由完成挂接或解除挂接操作的实体(即外部挂接器)进行填充。

## VolumeAttachmentSpec {#VolumeAttachmentSpec}
<!--
Expand All @@ -73,22 +76,24 @@ VolumeAttachmentSpec 是 VolumeAttachment 请求的规约。

<!--
- **attacher** (string), required
Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().
- **nodeName** (string), required
The node that the volume should be attached to.
nodeName represents the node that the volume should be attached to.
-->
- **attacher** (string),必需

attacher 表示必须处理此请求的卷驱动的名称。这是由 GetPluginName() 返回的名称。

- **nodeName** (string),必需

卷应挂接到的节点
nodeName 表示卷应挂接到的节点

<!--
- **source** (VolumeAttachmentSource), required
Source represents the volume that should be attached.
source represents the volume that should be attached.
<a name="VolumeAttachmentSource"></a>
*VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.*
Expand All @@ -97,121 +102,134 @@ VolumeAttachmentSpec 是 VolumeAttachment 请求的规约。
inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.
- **source.persistentVolumeName** (string)
Name of the persistent volume to attach.
persistentVolumeName represents the name of the persistent volume to attach.
-->
- **source** (VolumeAttachmentSource),必需

source 表示应挂接的卷。

<a name="VolumeAttachmentSource"></a>
**VolumeAttachmentSource 表示应挂接的卷。现在只能通过外部挂接器挂接 PersistenVolume,
将来我们可能还允许 Pod 中的内联卷。只能设置一个成员。**

- **source.inlineVolumeSpec** (<a href="{{< ref "../config-and-storage-resources/persistent-volume-v1#PersistentVolumeSpec" >}}">PersistentVolumeSpec</a>)

inlineVolumeSpec 包含挂接由 Pod 的内联 VolumeSource 定义的持久卷时所有必需的信息。
仅为 CSIMigation 功能填充此字段。
它包含从 Pod 的内联 VolumeSource 转换为 PersistentVolumeSpec 的字段。
此字段处于 Beta 阶段,且只有启用 CSIMigration 功能的服务器才能使用此字段。

- **source.persistentVolumeName** (string)

要挂接的持久卷的名称
persistentVolumeName 是要挂接的持久卷的名称

## VolumeAttachmentStatus {#VolumeAttachmentStatus}
<!--
VolumeAttachmentStatus is the status of a VolumeAttachment request.
<hr>
- **attached** (boolean), required
Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
attached indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
-->
VolumeAttachmentStatus 是 VolumeAttachment 请求的状态。

<hr>

- **attached** (boolean),必需

表示卷被成功挂接。此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。
attached 表示卷被成功挂接。此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。

<!--
- **attachError** (VolumeError)
The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
attachError represents the last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
<a name="VolumeError"></a>
*VolumeError captures an error encountered during a volume operation.*
- **attachError.message** (string)
String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
message represents the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
- **attachError.time** (Time)
Time the error was encountered.
time represents the time the error was encountered.
<a name="Time"></a>
*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.*
-->
- **attachError** (VolumeError)

挂接操作期间遇到的最后一个错误,如果有。
attachError 表示挂接操作期间遇到的最后一个错误,如果有。
此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。

<a name="VolumeError"></a>
**VolumeError 抓取卷操作期间遇到的一个错误。**

- **attachError.message** (string)

此字符串详细说明挂接或解除挂接操作期间遇到的错误
message 表示挂接或解除挂接操作期间遇到的错误
此字符串可以放入日志,因此它不应包含敏感信息。

- **attachError.time** (Time)

遇到错误的时间。

<a name="Time"></a>
**time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。
为 time 包提供的许多工厂方法提供了包装类。**

<!--
- **attachmentMetadata** (map[string]string)
Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
attachmentMetadata is populated with any information returned by the attach operation, upon successful attach, that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.
-->
- **attachmentMetadata** (map[string]string)

成功挂接时,此字段将由挂接操作返回的任何信息进行填充
成功挂接时,attachmentMetadata 字段将由挂接操作返回的任何信息进行填充
这些信息必须传递到后续的 WaitForAttach 或 Mount 调用中。
此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。

<!--
- **detachError** (VolumeError)
The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.
detachError represents the last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.
<a name="VolumeError"></a>
*VolumeError captures an error encountered during a volume operation.*
- **detachError.message** (string)
String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
message represents the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.
- **detachError.time** (Time)
Time the error was encountered.
time represents the time the error was encountered.
<a name="Time"></a>
*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.*
-->
- **detachError** (VolumeError)

解除挂接操作期间遇到的最后一个错误,如果有。
detachError 表示解除挂接操作期间遇到的最后一个错误,如果有。
此字段只能由完成解除挂接操作的实体(例如外部挂接器)进行设置。

<a name="VolumeError"></a>
**VolumeError 抓取卷操作期间遇到的一个错误。**

- **detachError.message** (string)

此字符串详细说明挂接或解除挂接操作期间遇到的错误
message 表示挂接或解除挂接操作期间遇到的错误
此字符串可以放入日志,因此它不应包含敏感信息。

- **detachError.time** (Time)

遇到错误的时间
time 表示遇到错误的时间

<a name="Time"></a>
**time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。
为 time 包提供的许多工厂方法提供了包装类。**
Expand All @@ -233,7 +251,8 @@ VolumeAttachmentList 是 VolumeAttachment 对象的集合。
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- **items** ([]<a href="{{< ref "../config-and-storage-resources/volume-attachment-v1#VolumeAttachment" >}}">VolumeAttachment</a>), required
Items is the list of VolumeAttachments
items is the list of VolumeAttachments
-->
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)

Expand Down Expand Up @@ -376,6 +395,10 @@ GET /apis/storage.k8s.io/v1/volumeattachments

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

- **sendInitialEvents** (**查询参数**): boolean

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

- **timeoutSeconds** (**查询参数**): integer

<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
Expand Down Expand Up @@ -798,6 +821,10 @@ DELETE /apis/storage.k8s.io/v1/volumeattachments

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

- **sendInitialEvents** (**查询参数**): boolean

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

- **timeoutSeconds** (**查询参数**): integer

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

0 comments on commit 9d48049

Please sign in to comment.