@@ -57,6 +57,9 @@ service Controller {
57
57
58
58
rpc ListSnapshots (ListSnapshotsRequest )
59
59
returns (ListSnapshotsResponse ) {}
60
+
61
+ rpc ControllerExpandVolume (ControllerExpandVolumeRequest )
62
+ returns (ControllerExpandVolumeResponse ) {}
60
63
}
61
64
62
65
service Node {
@@ -75,6 +78,11 @@ service Node {
75
78
rpc NodeGetVolumeStats (NodeGetVolumeStatsRequest )
76
79
returns (NodeGetVolumeStatsResponse ) {}
77
80
81
+
82
+ rpc NodeExpandVolume (NodeExpandVolumeRequest )
83
+ returns (NodeExpandVolumeResponse ) {}
84
+
85
+
78
86
rpc NodeGetCapabilities (NodeGetCapabilitiesRequest )
79
87
returns (NodeGetCapabilitiesResponse ) {}
80
88
@@ -116,7 +124,6 @@ message PluginCapability {
116
124
message Service {
117
125
enum Type {
118
126
UNKNOWN = 0 ;
119
-
120
127
// CONTROLLER_SERVICE indicates that the Plugin provides RPCs for
121
128
// the ControllerService. Plugins SHOULD provide this capability.
122
129
// In rare cases certain plugins MAY wish to omit the
@@ -138,9 +145,55 @@ message PluginCapability {
138
145
Type type = 1 ;
139
146
}
140
147
148
+ message VolumeExpansion {
149
+ enum Type {
150
+ UNKNOWN = 0 ;
151
+
152
+ // ONLINE indicates that volumes may be expanded when published to
153
+ // a node. When a Plugin implements this capability it MUST
154
+ // implement either the EXPAND_VOLUME controller capability or the
155
+ // EXPAND_VOLUME node capability or both. When a plugin supports
156
+ // ONLINE volume expansion and also has the EXPAND_VOLUME
157
+ // controller capability then the plugin MUST support expansion of
158
+ // volumes currently published and available on a node. When a
159
+ // plugin supports ONLINE volume expansion and also has the
160
+ // EXPAND_VOLUME node capability then the plugin MAY support
161
+ // expansion of node-published volume via NodeExpandVolume.
162
+ //
163
+ // Example 1: Given a shared filesystem volume (e.g. GlusterFs),
164
+ // the Plugin may set the ONLINE volume expansion capability and
165
+ // implement ControllerExpandVolume but not NodeExpandVolume.
166
+ //
167
+ // Example 2: Given a block storage volume type (e.g. EBS), the
168
+ // Plugin may set the ONLINE volume expansion capability and
169
+ // implement both ControllerExpandVolume and NodeExpandVolume.
170
+ //
171
+ // Example 3: Given a Plugin that supports volume expansion only
172
+ // upon a node, the Plugin may set the ONLINE volume
173
+ // expansion capability and implement NodeExpandVolume but not
174
+ // ControllerExpandVolume.
175
+ ONLINE = 1 ;
176
+
177
+ // OFFLINE indicates that volumes currently published and
178
+ // available on a node SHALL NOT be expanded via
179
+ // ControllerExpandVolume. When a plugin supports OFFLINE volume
180
+ // expansion it MUST implement either the EXPAND_VOLUME controller
181
+ // capability or both the EXPAND_VOLUME controller capability and
182
+ // the EXPAND_VOLUME node capability.
183
+ //
184
+ // Example 1: Given a block storage volume type (e.g. Azure Disk)
185
+ // that does not support expansion of "node-attached" (i.e.
186
+ // controller-published) volumes, the Plugin may indicate
187
+ // OFFLINE volume expansion support and implement both
188
+ // ControllerExpandVolume and NodeExpandVolume.
189
+ OFFLINE = 2 ;
190
+ }
191
+ }
192
+
141
193
oneof type {
142
194
// Service that the plugin supports.
143
195
Service service = 1 ;
196
+ VolumeExpansion volume_expansion = 2 ;
144
197
}
145
198
}
146
199
message ProbeRequest {
@@ -817,14 +870,19 @@ message ControllerServiceCapability {
817
870
// snapshot.
818
871
CREATE_DELETE_SNAPSHOT = 5 ;
819
872
LIST_SNAPSHOTS = 6 ;
873
+
820
874
// Plugins supporting volume cloning at the storage level MAY
821
875
// report this capability. The source volume MUST be managed by
822
876
// the same plugin. Not all volume sources and parameters
823
877
// combinations MAY work.
824
878
CLONE_VOLUME = 7 ;
879
+
825
880
// Indicates the SP supports ControllerPublishVolume.readonly
826
881
// field.
827
882
PUBLISH_READONLY = 8 ;
883
+
884
+ // See VolumeExpansion for details.
885
+ EXPAND_VOLUME = 9 ;
828
886
}
829
887
830
888
Type type = 1 ;
@@ -967,6 +1025,28 @@ message ListSnapshotsResponse {
967
1025
// An empty string is equal to an unspecified field value.
968
1026
string next_token = 2 ;
969
1027
}
1028
+ message ControllerExpandVolumeRequest {
1029
+ // The ID of the volume to expand. This field is REQUIRED.
1030
+ string volume_id = 1 ;
1031
+
1032
+ // This allows CO to specify the capacity requirements of the volume
1033
+ // after expansion. This field is REQUIRED.
1034
+ CapacityRange capacity_range = 2 ;
1035
+
1036
+ // Secrets required by the plugin for expanding the volume.
1037
+ // This field is OPTIONAL.
1038
+ map <string , string > secrets = 3 [(csi_secret) = true ];
1039
+ }
1040
+
1041
+ message ControllerExpandVolumeResponse {
1042
+ // Capacity of volume after expansion. This field is REQUIRED.
1043
+ int64 capacity_bytes = 1 ;
1044
+
1045
+ // Whether node expansion is required for the volume. When true
1046
+ // the CO MUST make NodeExpandVolume RPC call on the node. This field
1047
+ // is REQUIRED.
1048
+ bool node_expansion_required = 2 ;
1049
+ }
970
1050
message NodeStageVolumeRequest {
971
1051
// The ID of the volume to publish. This field is REQUIRED.
972
1052
string volume_id = 1 ;
@@ -1151,6 +1231,8 @@ message NodeServiceCapability {
1151
1231
// then it MUST implement NodeGetVolumeStats RPC
1152
1232
// call for fetching volume statistics.
1153
1233
GET_VOLUME_STATS = 2 ;
1234
+ // See VolumeExpansion for details.
1235
+ EXPAND_VOLUME = 3 ;
1154
1236
}
1155
1237
1156
1238
Type type = 1 ;
@@ -1201,3 +1283,23 @@ message NodeGetInfoResponse {
1201
1283
// "Z2".
1202
1284
Topology accessible_topology = 3 ;
1203
1285
}
1286
+ message NodeExpandVolumeRequest {
1287
+ // The ID of the volume. This field is REQUIRED.
1288
+ string volume_id = 1 ;
1289
+
1290
+ // The path on which volume is available. This field is REQUIRED.
1291
+ string volume_path = 2 ;
1292
+
1293
+ // This allows CO to specify the capacity requirements of the volume
1294
+ // after expansion. If capacity_range is omitted then a plugin MAY
1295
+ // inspect the file system of the volume to determine the maximum
1296
+ // capacity to which the volume can be expanded. In such cases a
1297
+ // plugin MAY expand the volume to its maximum capacity.
1298
+ // This field is OPTIONAL.
1299
+ CapacityRange capacity_range = 3 ;
1300
+ }
1301
+
1302
+ message NodeExpandVolumeResponse {
1303
+ // The capacity of the volume in bytes. This field is OPTIONAL.
1304
+ int64 capacity_bytes = 1 ;
1305
+ }
0 commit comments