Skip to content

Commit

Permalink
Merge pull request #544 from sunnylovestiramisu/kep-3751
Browse files Browse the repository at this point in the history
Spec ModifyVolume for QoS kep-3751
  • Loading branch information
saad-ali authored Aug 4, 2023
2 parents 98031ee + c918b7f commit 9ff6982
Show file tree
Hide file tree
Showing 3 changed files with 659 additions and 329 deletions.
64 changes: 61 additions & 3 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ service Controller {
returns (ControllerGetVolumeResponse) {
option (alpha_method) = true;
}

rpc ControllerModifyVolume (ControllerModifyVolumeRequest)
returns (ControllerModifyVolumeResponse) {
option (alpha_method) = true;
}
}

service GroupController {
Expand Down Expand Up @@ -350,9 +355,10 @@ message CreateVolumeRequest {
// This field is REQUIRED.
repeated VolumeCapability volume_capabilities = 3;

// Plugin specific parameters passed in as opaque key-value pairs.
// This field is OPTIONAL. The Plugin is responsible for parsing and
// validating these parameters. COs will treat these as opaque.
// Plugin specific creation-time parameters passed in as opaque
// key-value pairs. This field is OPTIONAL. The Plugin is responsible
// for parsing and validating these parameters. COs will treat
// these as opaque.
map<string, string> parameters = 4;

// Secrets required by plugin to complete volume creation request.
Expand All @@ -376,6 +382,19 @@ message CreateVolumeRequest {
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
// choose where the provisioned volume is accessible from.
TopologyRequirement accessibility_requirements = 7;

// Plugin specific creation-time parameters passed in as opaque
// key-value pairs. These mutable_parameteres MAY also be
// changed during the lifetime of the volume via a subsequent
// `ControllerModifyVolume` RPC. This field is OPTIONAL.
// The Plugin is responsible for parsing and validating these
// parameters. COs will treat these as opaque.

// Plugins MUST treat these
// as if they take precedence over the parameters field.
// This field SHALL NOT be specified unless the SP has the
// MODIFY_VOLUME plugin capability.
map<string, string> mutable_parameters = 8 [(alpha_field) = true];
}

// Specifies what source the volume will be created from. One of the
Expand Down Expand Up @@ -849,6 +868,10 @@ message ValidateVolumeCapabilitiesRequest {
// This field is OPTIONAL. Refer to the `Secrets Requirements`
// section on how to use this field.
map<string, string> secrets = 5 [(csi_secret) = true];

// See CreateVolumeRequest.mutable_parameters.
// This field is OPTIONAL.
map<string, string> mutable_parameters = 6 [(alpha_field) = true];
}

message ValidateVolumeCapabilitiesResponse {
Expand All @@ -864,6 +887,10 @@ message ValidateVolumeCapabilitiesResponse {
// The volume creation parameters validated by the plugin.
// This field is OPTIONAL.
map<string, string> parameters = 3;

// The volume creation mutable_parameters validated by the plugin.
// This field is OPTIONAL.
map<string, string> mutable_parameters = 4 [(alpha_field) = true];
}

// Confirmed indicates to the CO the set of capabilities that the
Expand Down Expand Up @@ -974,6 +1001,33 @@ message ControllerGetVolumeResponse {
// This field is REQUIRED.
VolumeStatus status = 2;
}
message ControllerModifyVolumeRequest {
option (alpha_message) = true;

// Contains identity information for the existing volume.
// This field is REQUIRED.
string volume_id = 1;

// Secrets required by plugin to complete modify volume request.
// This field is OPTIONAL. Refer to the `Secrets Requirements`
// section on how to use this field.
map<string, string> secrets = 2 [(csi_secret) = true];

// Plugin specific volume attributes to mutate, passed in as
// opaque key-value pairs.
// This field is REQUIRED. The Plugin is responsible for
// parsing and validating these parameters. COs will treat these
// as opaque. The CO SHOULD specify the intended values of all mutable
// parameters it intends to modify. SPs MUST NOT modify volumes based
// on the absence of keys, only keys that are specified should result
// in modifications to the volume.
map<string, string> mutable_parameters = 3;
}

message ControllerModifyVolumeResponse {
option (alpha_message) = true;
}

message GetCapacityRequest {
// If specified, the Plugin SHALL report the capacity of the storage
// that can be used to provision volumes that satisfy ALL of the
Expand Down Expand Up @@ -1113,6 +1167,10 @@ message ControllerServiceCapability {
// 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];

// Indicates the SP supports modifying volume with mutable
// parameters. See ControllerModifyVolume for details.
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down
Loading

0 comments on commit 9ff6982

Please sign in to comment.