VolumeAttachment
apiVersion: storage.k8s.io/v1
import "k8s.io/api/storage/v1"
VolumeAttachment
VolumeAttachment 抓取将指定卷挂接到指定节点或从指定节点解除挂接指定卷的意图。
VolumeAttachment 对象未划分命名空间。
- 
apiVersion: storage.k8s.io/v1
 - 
kind: VolumeAttachment
 
- 
metadata (ObjectMeta)
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 - 
spec (VolumeAttachmentSpec),必需
spec 表示期望的挂接/解除挂接卷行为的规约。由 Kubernetes 系统填充。
 
- 
status (VolumeAttachmentStatus)
status 表示 VolumeAttachment 请求的状态。由完成挂接或解除挂接操作的实体 (即外部挂接器)进行填充。
 
VolumeAttachmentSpec
VolumeAttachmentSpec 是 VolumeAttachment 请求的规约。
- 
attacher (string),必需
attacher 表示必须处理此请求的卷驱动的名称。这是由 GetPluginName() 返回的名称。
 - 
nodeName (string),必需
nodeName 表示卷应挂接到的节点。
 
- 
source (VolumeAttachmentSource),必需
source 表示应挂接的卷。
VolumeAttachmentSource 表示应挂接的卷。现在只能通过外部挂接器挂接 PersistentVolume, 将来我们可能还允许 Pod 中的内联卷。只能设置一个成员。
- 
source.inlineVolumeSpec (PersistentVolumeSpec)
inlineVolumeSpec 包含挂接由 Pod 的内联 VolumeSource 定义的持久卷时所有必需的信息。 仅为 CSIMigation 特性填充此字段。 它包含从 Pod 的内联 VolumeSource 转换为 PersistentVolumeSpec 的字段。 此字段处于 Beta 阶段,且只有启用 CSIMigration 特性的服务器才能使用此字段。
 - 
source.persistentVolumeName (string)
persistentVolumeName 是要挂接的持久卷的名称。
 
 - 
 
VolumeAttachmentStatus
VolumeAttachmentStatus 是 VolumeAttachment 请求的状态。
- 
attached (boolean),必需
attached 表示卷被成功挂接。此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。
 
- 
attachError (VolumeError)
attachError 表示挂接操作期间遇到的最后一个错误,如果有。 此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。
- 
attachError.errorCode (int32)
errorCode 是一个 gRPC 错误码,代表在 Attach 或 Detach 操作期间遇到的错误。
这是一个可选的、Beta 阶段的字段,要求启用了 MutableCSINodeAllocatableCount 特性门控才能设置。
 
 - 
 
- 
attachmentMetadata (map[string]string)
成功挂接时,attachmentMetadata 字段将由挂接操作返回的任何信息进行填充, 这些信息必须传递到后续的 WaitForAttach 或 Mount 调用中。 此字段只能由完成挂接操作的实体(例如外部挂接器)进行设置。
 
- 
detachError (VolumeError)
detachError 表示解除挂接操作期间遇到的最后一个错误,如果有。 此字段只能由完成解除挂接操作的实体(例如外部挂接器)进行设置。
- 
attachError.errorCode (int32)
errorCode 是一个 gRPC 错误码,代表在 Attach 或 Detach 操作期间遇到的错误。
这是一个可选的、Beta 阶段的字段,要求启用了 MutableCSINodeAllocatableCount 特性门控才能设置。
 
 - 
 
VolumeAttachmentList
VolumeAttachmentList 是 VolumeAttachment 对象的集合。
- 
apiVersion: storage.k8s.io/v1
 - 
kind: VolumeAttachmentList
 
- 
metadata (ListMeta)
标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
 - 
items ([]VolumeAttachment),必需
items 是 VolumeAttachment 的列表。
 
操作
get 读取指定的 VolumeAttachment
HTTP 请求
GET /apis/storage.k8s.io/v1/volumeattachments/{name}
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
401: Unauthorized
get 读取指定的 VolumeAttachment 的状态
HTTP 请求
GET /apis/storage.k8s.io/v1/volumeattachments/{name}/status
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
401: Unauthorized
list 列举或观测类别为 VolumeAttachment 的对象
HTTP 请求
GET /apis/storage.k8s.io/v1/volumeattachments
参数
- 
allowWatchBookmarks (查询参数): boolean
 - 
continue (查询参数): string
 - 
fieldSelector (查询参数): string
 - 
labelSelector (查询参数): string
 - 
limit (查询参数): integer
 - 
pretty (查询参数): string
 - 
resourceVersion (查询参数): string
 - 
resourceVersionMatch (查询参数): string
 - 
sendInitialEvents (查询参数): boolean
 - 
timeoutSeconds (查询参数): integer
 - 
watch (查询参数): boolean
 
响应
200 (VolumeAttachmentList): OK
401: Unauthorized
create 创建 VolumeAttachment
HTTP 请求
POST /apis/storage.k8s.io/v1/volumeattachments
参数
- 
body: VolumeAttachment,必需
 - 
dryRun (查询参数): string
 - 
fieldManager (查询参数): string
 - 
fieldValidation (查询参数): string
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
201 (VolumeAttachment): Created
202 (VolumeAttachment): Accepted
401: Unauthorized
update 替换指定的 VolumeAttachment
HTTP 请求
PUT /apis/storage.k8s.io/v1/volumeattachments/{name}
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
body: VolumeAttachment,必需
 - 
dryRun (查询参数): string
 - 
fieldManager (查询参数): string
 - 
fieldValidation (查询参数): string
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
201 (VolumeAttachment): Created
401: Unauthorized
update 替换指定的 VolumeAttachment 的状态
HTTP 请求
PUT /apis/storage.k8s.io/v1/volumeattachments/{name}/status
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
body: VolumeAttachment,必需
 - 
dryRun (查询参数): string
 - 
fieldManager (查询参数): string
 - 
fieldValidation (查询参数): string
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
201 (VolumeAttachment): Created
401: Unauthorized
patch 部分更新指定的 VolumeAttachment
HTTP 请求
PATCH /apis/storage.k8s.io/v1/volumeattachments/{name}
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
body: Patch,必需
 - 
dryRun (查询参数): string
 - 
fieldManager (查询参数): string
 - 
fieldValidation (查询参数): string
 - 
force (查询参数): boolean
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
201 (VolumeAttachment): Created
401: Unauthorized
patch 部分更新指定的 VolumeAttachment 的状态
HTTP 请求
PATCH /apis/storage.k8s.io/v1/volumeattachments/{name}/status
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
body: Patch,必需
 - 
dryRun (查询参数): string
 - 
fieldManager (查询参数): string
 - 
fieldValidation (查询参数): string
 - 
force (查询参数): boolean
 - 
pretty (查询参数): string
 
响应
200 (VolumeAttachment): OK
201 (VolumeAttachment): Created
401: Unauthorized
delete 删除 VolumeAttachment
HTTP 请求
DELETE /apis/storage.k8s.io/v1/volumeattachments/{name}
参数
- 
name (路径参数): string,必需
VolumeAttachment 的名称。
 - 
body: DeleteOptions
 - 
dryRun (查询参数): string
 - 
gracePeriodSeconds (查询参数): integer
 - 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean
 - 
pretty (查询参数): string
 - 
propagationPolicy (查询参数): string
 
响应
200 (VolumeAttachment): OK
202 (VolumeAttachment): Accepted
401: Unauthorized
deletecollection 删除 VolumeAttachment 的集合
HTTP 请求
DELETE /apis/storage.k8s.io/v1/volumeattachments
参数
- 
body: DeleteOptions
 - 
continue (查询参数): string
 - 
dryRun (查询参数): string
 - 
fieldSelector (查询参数): string
 - 
gracePeriodSeconds (查询参数): integer
 - 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean
 - 
labelSelector (查询参数): string
 - 
limit (查询参数): integer
 - 
pretty (查询参数): string
 - 
propagationPolicy (查询参数): string
 - 
resourceVersion (查询参数): string
 - 
resourceVersionMatch (查询参数): string
 - 
sendInitialEvents (查询参数): boolean
 - 
timeoutSeconds (查询参数): integer
 
响应
200 (Status): OK
401: Unauthorized