Skip to content

Commit 474f1a5

Browse files
Spec ModifyVolume for QoS kep-3751
1 parent b01039c commit 474f1a5

File tree

3 files changed

+651
-329
lines changed

3 files changed

+651
-329
lines changed

csi.proto

+56-3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ service Controller {
100100
returns (ControllerGetVolumeResponse) {
101101
option (alpha_method) = true;
102102
}
103+
104+
rpc ControllerModifyVolume (ControllerModifyVolumeRequest)
105+
returns (ControllerModifyVolumeResponse) {
106+
option (alpha_method) = true;
107+
}
103108
}
104109

105110
service GroupController {
@@ -350,9 +355,10 @@ message CreateVolumeRequest {
350355
// This field is REQUIRED.
351356
repeated VolumeCapability volume_capabilities = 3;
352357

353-
// Plugin specific parameters passed in as opaque key-value pairs.
354-
// This field is OPTIONAL. The Plugin is responsible for parsing and
355-
// validating these parameters. COs will treat these as opaque.
358+
// Plugin specific creation-time parameters passed in as opaque
359+
// key-value pairs. This field is OPTIONAL. The Plugin is responsible
360+
// for parsing and validating these parameters. COs will treat
361+
// these as opaque.
356362
map<string, string> parameters = 4;
357363

358364
// Secrets required by plugin to complete volume creation request.
@@ -376,6 +382,15 @@ message CreateVolumeRequest {
376382
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
377383
// choose where the provisioned volume is accessible from.
378384
TopologyRequirement accessibility_requirements = 7;
385+
386+
// Plugin specific mutable parameters passed in as opaque key-value
387+
// pairs. This field is OPTIONAL. The Plugin is responsible for
388+
// parsing and validating these parameters. COs will treat these
389+
// as opaque. Plugins MUST treat these as if they take precedence
390+
// over the parameters field.
391+
// COs SHALL NOT provide any values in mutable_parameters if the
392+
// capability is not enabled.
393+
map<string, string> mutable_parameters = 8 [(alpha_field) = true];
379394
}
380395

381396
// Specifies what source the volume will be created from. One of the
@@ -849,6 +864,10 @@ message ValidateVolumeCapabilitiesRequest {
849864
// This field is OPTIONAL. Refer to the `Secrets Requirements`
850865
// section on how to use this field.
851866
map<string, string> secrets = 5 [(csi_secret) = true];
867+
868+
// See CreateVolumeRequest.mutable_parameters.
869+
// This field is OPTIONAL.
870+
map<string, string> mutable_parameters = 6 [(alpha_field) = true];
852871
}
853872

854873
message ValidateVolumeCapabilitiesResponse {
@@ -864,6 +883,10 @@ message ValidateVolumeCapabilitiesResponse {
864883
// The volume creation parameters validated by the plugin.
865884
// This field is OPTIONAL.
866885
map<string, string> parameters = 3;
886+
887+
// The volume creation mutable_parameters validated by the plugin.
888+
// This field is OPTIONAL.
889+
map<string, string> mutable_parameters = 4 [(alpha_field) = true];
867890
}
868891

869892
// Confirmed indicates to the CO the set of capabilities that the
@@ -974,6 +997,32 @@ message ControllerGetVolumeResponse {
974997
// This field is REQUIRED.
975998
VolumeStatus status = 2;
976999
}
1000+
message ControllerModifyVolumeRequest {
1001+
option (alpha_message) = true;
1002+
1003+
// Contains identity information for the existing volume.
1004+
// This field is REQUIRED.
1005+
string volume_id = 1;
1006+
1007+
// Secrets required by plugin to complete modify volume request.
1008+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
1009+
// section on how to use this field.
1010+
map<string, string> secrets = 2 [(csi_secret) = true];
1011+
1012+
// Plugin specific parameters to apply, passed in as opaque key-value
1013+
// pairs. This field is OPTIONAL. The Plugin is responsible for
1014+
// parsing and validating these parameters. COs will treat these
1015+
// as opaque. COs MUST specify the intended value of every mutable
1016+
// parameter. Absent keys that were previously assigned a value MUST
1017+
// be interpreted as a deletion of the key from the set of mutable
1018+
// parameters.
1019+
map<string, string> mutable_parameters = 3;
1020+
}
1021+
1022+
message ControllerModifyVolumeResponse {
1023+
option (alpha_message) = true;
1024+
}
1025+
9771026
message GetCapacityRequest {
9781027
// If specified, the Plugin SHALL report the capacity of the storage
9791028
// that can be used to provision volumes that satisfy ALL of the
@@ -1113,6 +1162,10 @@ message ControllerServiceCapability {
11131162
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
11141163
// supported, in order to permit older COs to continue working.
11151164
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1165+
1166+
// Indicates the SP supports modifying volume with mutable
1167+
// parameters. See ControllerModifyVolume for details.
1168+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
11161169
}
11171170

11181171
Type type = 1;

0 commit comments

Comments
 (0)