Update CSI proto to 1.5.0

This commit is contained in:
Mehran Kholdi
2021-07-02 18:45:10 +04:30
parent e585684502
commit 7717264801
3 changed files with 904 additions and 455 deletions

View File

@@ -395,6 +395,19 @@ message VolumeCapability {
// to untrusted entities. The total size of this repeated field
// SHALL NOT exceed 4 KiB.
repeated string mount_flags = 2;
// If SP has VOLUME_MOUNT_GROUP node capability and CO provides
// this field then SP MUST ensure that the volume_mount_group
// parameter is passed as the group identifier to the underlying
// operating system mount system call, with the understanding
// that the set of available mount call parameters and/or
// mount implementations may vary across operating systems.
// Additionally, new file and/or directory entries written to
// the underlying filesystem SHOULD be permission-labeled in such a
// manner, unless otherwise modified by a workload, that they are
// both readable and writable by said mount group identifier.
// This is an OPTIONAL field.
string volume_mount_group = 3 [(alpha_field) = true];
}
// Specify how a volume can be accessed.
@@ -420,6 +433,18 @@ message VolumeCapability {
// Can be published as read/write at multiple nodes
// simultaneously.
MULTI_NODE_MULTI_WRITER = 5;
// Can only be published once as read/write at a single workload
// on a single node, at any given time. SHOULD be used instead of
// SINGLE_NODE_WRITER for COs using the experimental
// SINGLE_NODE_MULTI_WRITER capability.
SINGLE_NODE_SINGLE_WRITER = 6 [(alpha_enum_value) = true];
// Can be published as read/write at multiple workloads on a
// single node simultaneously. SHOULD be used instead of
// SINGLE_NODE_WRITER for COs using the experimental
// SINGLE_NODE_MULTI_WRITER capability.
SINGLE_NODE_MULTI_WRITER = 7 [(alpha_enum_value) = true];
}
// This field is REQUIRED.
@@ -947,6 +972,42 @@ message GetCapacityResponse {
// storage. This field is REQUIRED.
// The value of this field MUST NOT be negative.
int64 available_capacity = 1;
// The largest size that may be used in a
// CreateVolumeRequest.capacity_range.required_bytes field
// to create a volume with the same parameters as those in
// GetCapacityRequest.
//
// If `volume_capabilities` or `parameters` is
// specified in the request, the Plugin SHALL take those into
// consideration when calculating the minimum volume size of the
// storage.
//
// This field is OPTIONAL. MUST NOT be negative.
// The Plugin SHOULD provide a value for this field if it has
// a maximum size for individual volumes and leave it unset
// otherwise. COs MAY use it to make decision about
// where to create volumes.
google.protobuf.Int64Value maximum_volume_size = 2
[(alpha_field) = true];
// The smallest size that may be used in a
// CreateVolumeRequest.capacity_range.limit_bytes field
// to create a volume with the same parameters as those in
// GetCapacityRequest.
//
// If `volume_capabilities` or `parameters` is
// specified in the request, the Plugin SHALL take those into
// consideration when calculating the maximum volume size of the
// storage.
//
// This field is OPTIONAL. MUST NOT be negative.
// The Plugin SHOULD provide a value for this field if it has
// a minimum size for individual volumes and leave it unset
// otherwise. COs MAY use it to make decision about
// where to create volumes.
google.protobuf.Int64Value minimum_volume_size = 3
[(alpha_field) = true];
}
message ControllerGetCapabilitiesRequest {
// Intentionally empty.
@@ -1008,6 +1069,16 @@ message ControllerServiceCapability {
// This enables COs to, for example, fetch per volume
// condition after a volume is provisioned.
GET_VOLUME = 12 [(alpha_enum_value) = true];
// Indicates the SP supports the SINGLE_NODE_SINGLE_WRITER and/or
// SINGLE_NODE_MULTI_WRITER access modes.
// These access modes are intended to replace the
// SINGLE_NODE_WRITER access mode to clarify the number of writers
// for a volume on a single node. Plugins MUST accept and allow
// use of the SINGLE_NODE_WRITER access mode when either
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
// supported, in order to permit older COs to continue working.
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
}
Type type = 1;
@@ -1206,6 +1277,10 @@ message NodeStageVolumeRequest {
// CO SHALL be responsible for creating the directory if it does not
// exist.
// This is a REQUIRED field.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string staging_target_path = 3;
// Volume capability describing how the CO intends to use this volume.
@@ -1236,6 +1311,10 @@ message NodeUnstageVolumeRequest {
// The path at which the volume was staged. It MUST be an absolute
// path in the root filesystem of the process serving this request.
// This is a REQUIRED field.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string staging_target_path = 2;
}
@@ -1259,6 +1338,10 @@ message NodePublishVolumeRequest {
// It MUST be set if the Node Plugin implements the
// `STAGE_UNSTAGE_VOLUME` node capability.
// This is an OPTIONAL field.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string staging_target_path = 3;
// The path to which the volume will be published. It MUST be an
@@ -1273,6 +1356,10 @@ message NodePublishVolumeRequest {
// mounted directory at target_path.
// Creation of target_path is the responsibility of the SP.
// This is a REQUIRED field.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string target_path = 4;
// Volume capability describing how the CO intends to use this volume.
@@ -1308,6 +1395,10 @@ message NodeUnpublishVolumeRequest {
// path in the root filesystem of the process serving this request.
// The SP MUST delete the file or directory it created at this path.
// This is a REQUIRED field.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string target_path = 2;
}
@@ -1323,6 +1414,10 @@ message NodeGetVolumeStatsRequest {
// It MUST be an absolute path in the root filesystem of
// the process serving this request.
// This is a REQUIRED field.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string volume_path = 2;
// The path where the volume is staged, if the plugin has the
@@ -1330,6 +1425,10 @@ message NodeGetVolumeStatsRequest {
// If not empty, it MUST be an absolute path in the root
// filesystem of the process serving this request.
// This field is OPTIONAL.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string staging_target_path = 3;
}
@@ -1412,6 +1511,22 @@ message NodeServiceCapability {
// Note that, for alpha, `VolumeCondition` is intended to be
// informative for humans only, not for automation.
VOLUME_CONDITION = 4 [(alpha_enum_value) = true];
// Indicates the SP supports the SINGLE_NODE_SINGLE_WRITER and/or
// SINGLE_NODE_MULTI_WRITER access modes.
// These access modes are intended to replace the
// SINGLE_NODE_WRITER access mode to clarify the number of writers
// for a volume on a single node. Plugins MUST accept and allow
// use of the SINGLE_NODE_WRITER access mode (subject to the
// processing rules for NodePublishVolume), when either
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
// supported, in order to permit older COs to continue working.
SINGLE_NODE_MULTI_WRITER = 5 [(alpha_enum_value) = true];
// Indicates that Node service supports mounting volumes
// with provided volume group identifier during node stage
// or node publish RPC calls.
VOLUME_MOUNT_GROUP = 6 [(alpha_enum_value) = true];
}
Type type = 1;
@@ -1434,6 +1549,10 @@ message NodeGetInfoResponse {
// `ControllerPublishVolume`, to refer to this node.
// The SP is NOT responsible for global uniqueness of node_id across
// multiple SPs.
// This field overrides the general CSI size limit.
// The size of this field SHALL NOT exceed 256 bytes. The general
// CSI size limit, 128 byte, is RECOMMENDED for best backwards
// compatibility.
string node_id = 1;
// Maximum number of volumes that controller can publish to the node.
@@ -1467,6 +1586,10 @@ message NodeExpandVolumeRequest {
string volume_id = 1;
// The path on which volume is available. This field is REQUIRED.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string volume_path = 2;
// This allows CO to specify the capacity requirements of the volume
@@ -1482,6 +1605,10 @@ message NodeExpandVolumeRequest {
// If not empty, it MUST be an absolute path in the root
// filesystem of the process serving this request.
// This field is OPTIONAL.
// This field overrides the general CSI size limit.
// SP SHOULD support the maximum path length allowed by the operating
// system/filesystem, but, at a minimum, SP MUST accept a max path
// length of at least 128 bytes.
string staging_target_path = 4;
// Volume capability describing how the CO intends to use this volume.
@@ -1494,6 +1621,12 @@ message NodeExpandVolumeRequest {
// access_type from given volume_path for the volume and perform
// node expansion. This is an OPTIONAL field.
VolumeCapability volume_capability = 5;
// Secrets required by plugin to complete node expand volume request.
// This field is OPTIONAL. Refer to the `Secrets Requirements`
// section on how to use this field.
map<string, string> secrets = 6
[(csi_secret) = true, (alpha_field) = true];
}
message NodeExpandVolumeResponse {