Skip to content
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
94 changes: 94 additions & 0 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ service Controller {
rpc ControllerModifyVolume (ControllerModifyVolumeRequest)
returns (ControllerModifyVolumeResponse) {
}

rpc ControllerGetNodeInfo (ControllerGetNodeInfoRequest)
returns (ControllerGetNodeInfoResponse) {
option (alpha_method) = true;
}
}

service GroupController {
Expand Down Expand Up @@ -167,6 +172,11 @@ service Node {

rpc NodeGetInfo (NodeGetInfoRequest)
returns (NodeGetInfoResponse) {}

rpc NodeGetID (NodeGetIDRequest)
returns (NodeGetIDResponse) {
option (alpha_method) = true;
}
}
message GetPluginInfoRequest {
// Intentionally empty.
Expand Down Expand Up @@ -1043,6 +1053,55 @@ message ControllerModifyVolumeRequest {
message ControllerModifyVolumeResponse {
}

message ControllerGetNodeInfoRequest {
// The identifier of the node as understood by the SP.
// This field is REQUIRED.
// This field MUST match the node_id returned by `NodeGetInfo` or
// `NodeGetID`.
// This field overrides the general CSI size limit.
// The size of this field SHALL NOT exceed 256 bytes.
string node_id = 1;

// The volume IDs that the CO believes are currently published to this
// node. This field is OPTIONAL.
// This SHOULD include all volumes that the CO considers published,
// including those with uncertain status (e.g., publish RPC failed).
// The SP MAY use this information to calculate the maximum number
// of volumes that can be published to the node.
// For example, if the node has a maximum of 16 publishable volumes
// and 10 volumes are already published, but only 8 reported by the
// CO, then the SP SHOULD infer that the remaining 2 volumes are not
// managed by CSI and only report 14 max_volumes_per_node.
repeated string published_volume_ids = 2;
}

message ControllerGetNodeInfoResponse {
// Maximum number of volumes that controller can publish to the node.
// If value is not set or zero CO SHALL decide how many volumes of
// this type can be published by the controller to the node. The
// plugin MUST NOT set negative values here.
// This field is OPTIONAL.
int64 max_volumes_per_node = 1;

// Specifies where (regions, zones, racks, etc.) the node is
// accessible from.
// A plugin that returns this field MUST also set the
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability.
// COs MAY use this information along with the topology information
// returned in CreateVolumeResponse to ensure that a given volume is
// accessible from a given node when scheduling workloads.
// This field is OPTIONAL. If it is not specified, the CO MAY assume
// the node is not subject to any topological constraint, and MAY
// schedule workloads that reference any volume V, such that there are
// no topological constraints declared for V.
//
// Example 1:
// accessible_topology =
// {"region": "R1", "zone": "Z2"}
// Indicates the node exists within the "region" "R1" and the "zone"
// "Z2".
Topology accessible_topology = 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 @@ -1190,6 +1249,12 @@ 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 the ControllerGetNodeInfo RPC.
// This enables COs to fetch node topology and capacity
// information from the controller side, avoiding the need for
// cloud API credentials on the node side.
GET_NODE_INFO = 16 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down Expand Up @@ -1672,6 +1737,15 @@ message NodeServiceCapability {
// with provided volume group identifier during node stage
// or node publish RPC calls.
VOLUME_MOUNT_GROUP = 6;

// Indicates the SP supports the NodeGetID RPC.
// This enables COs to fetch only the node identifier from
// the node side without requiring cloud API credentials.
// The topology and capacity information can then be fetched
// via ControllerGetNodeInfo.
// If the SP supports GET_ID, it MUST also support
// GET_NODE_INFO controller capability.
GET_ID = 7 [(alpha_enum_value) = true];
}

Type type = 1;
Expand Down Expand Up @@ -1726,6 +1800,26 @@ message NodeGetInfoResponse {
// "Z2".
Topology accessible_topology = 3;
}
message NodeGetIDRequest {
// Intentionally empty.
}

message NodeGetIDResponse {
// The identifier of the node as understood by the SP.
// This field is REQUIRED.
// This field MUST contain enough information to uniquely identify
// this specific node vs all other nodes supported by this plugin.
// This field SHALL be used by the CO in subsequent calls, including
// `ControllerPublishVolume` and `ControllerGetNodeInfo`, 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;
}
message NodeExpandVolumeRequest {
// The ID of the volume. This field is REQUIRED.
string volume_id = 1;
Expand Down
Loading
Loading