Skip to content

Commit 7a2fcdd

Browse files
committed
GetCapacityResponse: minimum volume size
Using CapacityRange in GetCapacityResponse is not a good fit because the names of its fields is a bit awkward. By adding two fields in GetCapacityResponse we support the same functionality, plus they can be left unset separately from each other.
1 parent 0600cb2 commit 7a2fcdd

File tree

3 files changed

+324
-252
lines changed

3 files changed

+324
-252
lines changed

csi.proto

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -948,19 +948,41 @@ message GetCapacityResponse {
948948
// The value of this field MUST NOT be negative.
949949
int64 available_capacity = 1;
950950

951-
// The supported volume size that may be used in a CreateVolume call
951+
// The largest size that may be used in a
952+
// CreateVolumeRequest.capacity_range.required_bytes field
952953
// to create a volume with the same parameters as those in
953-
// GetCapacityRequest, given as a lower bound (`required_bytes`)
954-
// and an upper bound (`limit_bytes`).
954+
// GetCapacityRequest.
955955
//
956956
// If `volume_capabilities` or `parameters` is
957957
// specified in the request, the Plugin SHALL take those into
958-
// consideration when calculating the supported volume size of the
958+
// consideration when calculating the minimum volume size of the
959959
// storage.
960960
//
961-
// This field is OPTIONAL. COs MAY use it to make decision about
961+
// This field is OPTIONAL. MUST NOT be negative.
962+
// The Plugin SHOULD provide a value for this field if it has
963+
// a maximum size for individual volumes and leave it unset
964+
// otherwise. COs MAY use it to make decision about
962965
// where to create volumes.
963-
CapacityRange volume_size = 2 [(alpha_field) = true];
966+
google.protobuf.Int64Value maximum_volume_size = 2
967+
[(alpha_field) = true];
968+
969+
// The smallest size that may be used in a
970+
// CreateVolumeRequest.capacity_range.limit_bytes field
971+
// to create a volume with the same parameters as those in
972+
// GetCapacityRequest.
973+
//
974+
// If `volume_capabilities` or `parameters` is
975+
// specified in the request, the Plugin SHALL take those into
976+
// consideration when calculating the maximum volume size of the
977+
// storage.
978+
//
979+
// This field is OPTIONAL. MUST NOT be negative.
980+
// The Plugin SHOULD provide a value for this field if it has
981+
// a minimum size for individual volumes and leave it unset
982+
// otherwise. COs MAY use it to make decision about
983+
// where to create volumes.
984+
google.protobuf.Int64Value minimum_volume_size = 3
985+
[(alpha_field) = true];
964986
}
965987
message ControllerGetCapabilitiesRequest {
966988
// Intentionally empty.

0 commit comments

Comments
 (0)