Skip to content

Commit 6c94335

Browse files
committed
Add volume capability to volume expansion calls
Update specs and add new error code for invalid capabilities
1 parent 4e23257 commit 6c94335

File tree

3 files changed

+289
-213
lines changed

3 files changed

+289
-213
lines changed

csi.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,15 @@ message ControllerExpandVolumeRequest {
10661066
// Secrets required by the plugin for expanding the volume.
10671067
// This field is OPTIONAL.
10681068
map<string, string> secrets = 3 [(csi_secret) = true];
1069+
1070+
// Volume capability describing how the CO intends to use this volume.
1071+
// This allows SP to determine if volume is being used as a block
1072+
// device or mounted file system. For example - if volume is
1073+
// being used as a block device - the SP MAY set
1074+
// node_expansion_required to false in ControllerExpandVolumeResponse
1075+
// to skip invocation of NodeExpandVolume on the node by the CO.
1076+
// This is an OPTIONAL field.
1077+
VolumeCapability volume_capability = 4;
10691078
}
10701079

10711080
message ControllerExpandVolumeResponse {
@@ -1341,6 +1350,17 @@ message NodeExpandVolumeRequest {
13411350
// filesystem of the process serving this request.
13421351
// This field is OPTIONAL.
13431352
string staging_path = 4;
1353+
1354+
// Volume capability describing how the CO intends to use this volume.
1355+
// This allows SP to determine if volume is being used as a block
1356+
// device or mounted file system. For example - if volume is being
1357+
// used as a block device the SP MAY choose to skip expanding the
1358+
// filesystem in NodeExpandVolume implementation but still perform
1359+
// rest of the housekeeping needed for expanding the volume. If
1360+
// volume_capability is omitted the SP MAY determine
1361+
// access_type from given volume_path for the volume and perform
1362+
// node expansion. This is an OPTIONAL field.
1363+
VolumeCapability volume_capability = 5;
13441364
}
13451365

13461366
message NodeExpandVolumeResponse {

0 commit comments

Comments
 (0)