Skip to content

Commit

Permalink
add volumeGroup spec
Browse files Browse the repository at this point in the history
Signed-off-by: matancarmeli7 <[email protected]>
  • Loading branch information
matancarmeli7 authored and mergify[bot] committed Jul 12, 2023
1 parent 8ea386f commit cc24a2c
Show file tree
Hide file tree
Showing 10 changed files with 2,349 additions and 101 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ clean-deps:
$(MAKE) -C identity $@
$(MAKE) -C reclaimspace $@
$(MAKE) -C replication $@
$(MAKE) -C volumegroup $@
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ The [Volume Replication](replication/README.md) specification provides a
mechanism that Storage Providers can implement to support async-replication
which can be used for disaster recovery operations.

## Volume Group

The [Volume Group](volumegroup/README.md) specification provides a
standard that will enable storage vendors (SP) to develop
controllers/plugins for managing VolumeGroups.

[csi_spec]: https://github.com/container-storage-interface/spec
59 changes: 50 additions & 9 deletions identity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ operations.

The API will

* make it possible for worker nodes (CSI NodePlugin) to announce themselves
* have the CSI-Addons plugin for the CO list all announced CSI-Addons capable
- make it possible for worker nodes (CSI NodePlugin) to announce themselves
- have the CSI-Addons plugin for the CO list all announced CSI-Addons capable
CSI-drivers
* provide details about CSI-Addons features the CSI-driver supports
- provide details about CSI-Addons features the CSI-driver supports

### Non-Goals in MVP

Expand Down Expand Up @@ -261,6 +261,45 @@ message Capability {
Type type = 1;
}
// VolumeGroup contains the features of the volumegroup operation
// that the CSI-driver supports.
message VolumeGroup {
// Type describes a CSI Service that CSI-drivers can support.
enum Type {
// UNKNOWN indicates that the CSI-driver does not support the
// VolumeGroup operation in the current mode. The CSI-Addons CO
// plugin will most likely ignore this node for the
// VolumeGroup operation.
UNKNOWN = 0;
// VOLUME_GROUP indicates that the CSI-driver provides RPCs for a
// VolumeGroup operation.
// The presence of this capability determines whether the CSI-Addons CO
// plugin can invoke RPCs that require access to the storage system,
// similar to the CSI Controller (provisioner).
VOLUME_GROUP = 1;
// LIMIT_VOLUME_TO_ONE_VOLUME_GROUP indicates that the CSI-driver
// does not support that one volume will be in multiple VGs,
// so it can be in only one VG.
LIMIT_VOLUME_TO_ONE_VOLUME_GROUP = 2;
// DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES indicates that the CSI-driver
// does not support that deletion of the VG
// won't delete the volumes under it.
DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES = 3;
// MODIFY_VOLUME_GROUP indicates that the CSI-driver
// supports that modifying the VG.
MODIFY_VOLUME_GROUP = 4;
// GET_VOLUME_GROUP indicates that the CSI-driver
// supports getting the VG.
GET_VOLUME_GROUP = 5;
// LIST_VOLUME_GROUPS indicates that the CSI-driver
// supports listing the VGs.
LIST_VOLUME_GROUPS = 6;
}
// type contains the Type of CSI Service that the CSI-driver supports.
Type type = 1;
}
// Additional CSI-Addons operations will need to be added here.
oneof type {
Expand All @@ -272,6 +311,8 @@ message Capability {
NetworkFence network_fence = 3;
// VolumeReplication operation capabilities.
VolumeReplication volume_replication = 4;
// VolumeGroup operation capabilities.
VolumeGroup volume_group = 5;
// Additional CSI-Addons operations need to be appended to this list.
}
Expand All @@ -291,8 +332,8 @@ response, a CSI-Addons CO plugin MAY take action with the intent to bring the
CSI-driver to a healthy state. Such actions MAY include, but SHALL NOT be
limited to, the following:

* Restarting the CSI-driver container, or
* Notifying the CSI-driver supervisor.
- Restarting the CSI-driver container, or
- Notifying the CSI-driver supervisor.

The CSI-driver MAY verify that it has the right configurations, devices,
dependencies and drivers in order to run and return a success if the validation
Expand Down Expand Up @@ -350,9 +391,9 @@ specified gRPC error code.
The CSI-Addons CO plugin MAY implement the specified error recovery behavior
when it encounters the gRPC error code.

| Condition | gRPC Code | Description | Recovery Behavior |
|-----------|-----------|-------------|-------------------|
| CSI-driver not healthy | 9 FAILED_PRECONDITION | Indicates that the CSI-driver is not in a healthy/ready state. | Caller SHOULD assume the CSI-driver is not healthy and that future RPCs MAY fail because of this condition. |
| Missing required dependency | 9 FAILED_PRECONDITION | Indicates that the CSI-driver is missing one or more required dependency. | Caller MUST assume the CSI-driver is not healthy. |
| Condition | gRPC Code | Description | Recovery Behavior |
| --------------------------- | --------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| CSI-driver not healthy | 9 FAILED_PRECONDITION | Indicates that the CSI-driver is not in a healthy/ready state. | Caller SHOULD assume the CSI-driver is not healthy and that future RPCs MAY fail because of this condition. |
| Missing required dependency | 9 FAILED_PRECONDITION | Indicates that the CSI-driver is missing one or more required dependency. | Caller MUST assume the CSI-driver is not healthy. |

[csi_spec]: https://github.com/container-storage-interface/spec/blob/master/spec.md
41 changes: 41 additions & 0 deletions identity/identity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,45 @@ message Capability {
Type type = 1;
}

// VolumeGroup contains the features of the volumegroup operation
// that the CSI-driver supports.
message VolumeGroup {
// Type describes a CSI Service that CSI-drivers can support.
enum Type {
// UNKNOWN indicates that the CSI-driver does not support the
// VolumeGroup operation in the current mode. The CSI-Addons CO
// plugin will most likely ignore this node for the
// VolumeGroup operation.
UNKNOWN = 0;

// VOLUME_GROUP indicates that the CSI-driver provides RPCs for a
// VolumeGroup operation.
// The presence of this capability determines whether the CSI-Addons CO
// plugin can invoke RPCs that require access to the storage system,
// similar to the CSI Controller (provisioner).
VOLUME_GROUP = 1;
// LIMIT_VOLUME_TO_ONE_VOLUME_GROUP indicates that the CSI-driver
// does not support that one volume will be in multiple VGs,
// so it can be in only one VG.
LIMIT_VOLUME_TO_ONE_VOLUME_GROUP = 2;
// DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES indicates that the CSI-driver
// does not support that deletion of the VG
// won't delete the volumes under it.
DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES = 3;
// MODIFY_VOLUME_GROUP indicates that the CSI-driver
// supports that modifying the VG.
MODIFY_VOLUME_GROUP = 4;
// GET_VOLUME_GROUP indicates that the CSI-driver
// supports getting the VG.
GET_VOLUME_GROUP = 5;
// LIST_VOLUME_GROUPS indicates that the CSI-driver
// supports listing the VGs.
LIST_VOLUME_GROUPS = 6;
}
// type contains the Type of CSI Service that the CSI-driver supports.
Type type = 1;
}

// Additional CSI-Addons operations will need to be added here.

oneof type {
Expand All @@ -172,6 +211,8 @@ message Capability {
NetworkFence network_fence = 3;
// VolumeReplication operation capabilities.
VolumeReplication volume_replication = 4;
// VolumeGroup operation capabilities.
VolumeGroup volume_group = 5;

// Additional CSI-Addons operations need to be appended to this list.
}
Expand Down
Loading

0 comments on commit cc24a2c

Please sign in to comment.