Skip to content

Add GRPC ControllerModifyVolumeTopology for KEP-5381 #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ service Controller {
returns (ControllerModifyVolumeResponse) {
option (alpha_method) = true;
}

rpc ControllerModifyVolumeTopology (
ControllerModifyVolumeTopologyRequest)
returns (ControllerModifyVolumeTopologyResponse) {
option (alpha_method) = true;
}
}

service GroupController {
Expand Down Expand Up @@ -1047,6 +1053,52 @@ message ControllerModifyVolumeResponse {
option (alpha_message) = true;
}

message ControllerModifyVolumeTopologyRequest {
option (alpha_message) = true;

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

// Secrets required by plugin to complete modify volume topology
// 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are modifying topology, why will the request not contain newer accessibility_requirements ?

Copy link
Author

@iltyty iltyty Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wanted SPs to determine the volume topologies according to the volume type and/or other information. Also, adding this field will result in several issues. E.g., we need to decide the priority between this field and the one in CreateVolume.

}

message ControllerModifyVolumeTopologyResponse {
option (alpha_message) = true;

// Specifies where (regions, zones, racks, etc.) the modified
// volume is accessible from.
// A plugin that returns this field MUST also set the
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability.
// The SP MAY specify multiple topologies to indicate the volume is
// accessible from multiple locations.
// COs MAY use this information along with the topology information
// returned by NodeGetInfo to ensure that a given volume is accessible
// from a given node when scheduling workloads.
repeated Topology accessible_topology = 1;

// Indicates whether the modification is still in progress.
// SP MAY set in_progress to update the accessible_topology
// before the modification finishes to reduce possible race
// conditions.
// COs SHOULD retry the request if in_progress is set to true,
// until in_progress is set to false.
bool in_progress = 2;
}
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 @@ -1194,6 +1246,10 @@ message ControllerServiceCapability {
// Indicates the SP supports the GetSnapshot RPC.
// This enables COs to fetch an existing snapshot.
GET_SNAPSHOT = 15 [(alpha_enum_value) = true];

// Indicates the SP supports modifying volume topology.
// See ControllerModifyVolumeTopology for details.
MODIFY_VOLUME_TOPOLOGY = 16 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down
Loading