@@ -110,6 +110,11 @@ service Controller {
110110 rpc ControllerModifyVolume (ControllerModifyVolumeRequest )
111111 returns (ControllerModifyVolumeResponse ) {
112112 }
113+
114+ rpc ControllerGetNodeInfo (ControllerGetNodeInfoRequest )
115+ returns (ControllerGetNodeInfoResponse ) {
116+ option (alpha_method) = true ;
117+ }
113118}
114119
115120service GroupController {
@@ -167,6 +172,11 @@ service Node {
167172
168173 rpc NodeGetInfo (NodeGetInfoRequest )
169174 returns (NodeGetInfoResponse ) {}
175+
176+ rpc NodeGetID (NodeGetIDRequest )
177+ returns (NodeGetIDResponse ) {
178+ option (alpha_method) = true ;
179+ }
170180}
171181message GetPluginInfoRequest {
172182 // Intentionally empty.
@@ -1043,6 +1053,55 @@ message ControllerModifyVolumeRequest {
10431053message ControllerModifyVolumeResponse {
10441054}
10451055
1056+ message ControllerGetNodeInfoRequest {
1057+ // The identifier of the node as understood by the SP.
1058+ // This field is REQUIRED.
1059+ // This field MUST match the node_id returned by `NodeGetInfo` or
1060+ // `NodeGetID`.
1061+ // This field overrides the general CSI size limit.
1062+ // The size of this field SHALL NOT exceed 256 bytes.
1063+ string node_id = 1 ;
1064+
1065+ // The volume IDs that the CO believes are currently published to this
1066+ // node. This field is OPTIONAL.
1067+ // This SHOULD include all volumes that the CO considers published,
1068+ // including those with uncertain status (e.g., publish RPC failed).
1069+ // The SP MAY use this information to calculate the maximum number
1070+ // of volumes that can be published to the node.
1071+ // For example, if the node has a maximum of 16 publishable volumes
1072+ // and 10 volumes are already published, but only 8 reported by the
1073+ // CO, then the SP SHOULD infer that the remaining 2 volumes are not
1074+ // managed by CSI and only report 14 max_volumes_per_node.
1075+ repeated string published_volume_ids = 2 ;
1076+ }
1077+
1078+ message ControllerGetNodeInfoResponse {
1079+ // Maximum number of volumes that controller can publish to the node.
1080+ // If value is not set or zero CO SHALL decide how many volumes of
1081+ // this type can be published by the controller to the node. The
1082+ // plugin MUST NOT set negative values here.
1083+ // This field is OPTIONAL.
1084+ int64 max_volumes_per_node = 1 ;
1085+
1086+ // Specifies where (regions, zones, racks, etc.) the node is
1087+ // accessible from.
1088+ // A plugin that returns this field MUST also set the
1089+ // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability.
1090+ // COs MAY use this information along with the topology information
1091+ // returned in CreateVolumeResponse to ensure that a given volume is
1092+ // accessible from a given node when scheduling workloads.
1093+ // This field is OPTIONAL. If it is not specified, the CO MAY assume
1094+ // the node is not subject to any topological constraint, and MAY
1095+ // schedule workloads that reference any volume V, such that there are
1096+ // no topological constraints declared for V.
1097+ //
1098+ // Example 1:
1099+ // accessible_topology =
1100+ // {"region": "R1", "zone": "Z2"}
1101+ // Indicates the node exists within the "region" "R1" and the "zone"
1102+ // "Z2".
1103+ Topology accessible_topology = 2 ;
1104+ }
10461105message GetCapacityRequest {
10471106 // If specified, the Plugin SHALL report the capacity of the storage
10481107 // that can be used to provision volumes that satisfy ALL of the
@@ -1190,6 +1249,12 @@ message ControllerServiceCapability {
11901249 // Indicates the SP supports the GetSnapshot RPC.
11911250 // This enables COs to fetch an existing snapshot.
11921251 GET_SNAPSHOT = 15 [(alpha_enum_value) = true ];
1252+
1253+ // Indicates the SP supports the ControllerGetNodeInfo RPC.
1254+ // This enables COs to fetch node topology and capacity
1255+ // information from the controller side, avoiding the need for
1256+ // cloud API credentials on the node side.
1257+ GET_NODE_INFO = 16 [(alpha_enum_value) = true ];
11931258 }
11941259
11951260 Type type = 1 ;
@@ -1672,6 +1737,15 @@ message NodeServiceCapability {
16721737 // with provided volume group identifier during node stage
16731738 // or node publish RPC calls.
16741739 VOLUME_MOUNT_GROUP = 6 ;
1740+
1741+ // Indicates the SP supports the NodeGetID RPC.
1742+ // This enables COs to fetch only the node identifier from
1743+ // the node side without requiring cloud API credentials.
1744+ // The topology and capacity information can then be fetched
1745+ // via ControllerGetNodeInfo.
1746+ // If the SP supports GET_ID, it MUST also support
1747+ // GET_NODE_INFO controller capability.
1748+ GET_ID = 7 [(alpha_enum_value) = true ];
16751749 }
16761750
16771751 Type type = 1 ;
@@ -1726,6 +1800,26 @@ message NodeGetInfoResponse {
17261800 // "Z2".
17271801 Topology accessible_topology = 3 ;
17281802}
1803+ message NodeGetIDRequest {
1804+ // Intentionally empty.
1805+ }
1806+
1807+ message NodeGetIDResponse {
1808+ // The identifier of the node as understood by the SP.
1809+ // This field is REQUIRED.
1810+ // This field MUST contain enough information to uniquely identify
1811+ // this specific node vs all other nodes supported by this plugin.
1812+ // This field SHALL be used by the CO in subsequent calls, including
1813+ // `ControllerPublishVolume` and `ControllerGetNodeInfo`, to refer to
1814+ // this node.
1815+ // The SP is NOT responsible for global uniqueness of node_id across
1816+ // multiple SPs.
1817+ // This field overrides the general CSI size limit.
1818+ // The size of this field SHALL NOT exceed 256 bytes. The general
1819+ // CSI size limit, 128 byte, is RECOMMENDED for best backwards
1820+ // compatibility.
1821+ string node_id = 1 ;
1822+ }
17291823message NodeExpandVolumeRequest {
17301824 // The ID of the volume. This field is REQUIRED.
17311825 string volume_id = 1 ;
0 commit comments