What is the problem?
The Device Object in the Volume Mount Object currently only supports existing shared devices. It allows to pass mount_config, which is used by the volume driver to mount volume.
There is no mechanism for a service broker to provide configuration that driver can use to create a device on demand.
Who does this affect?
Volume service broker authors who need to create devices on-demand rather than using existing volumes.
Do you have any proposed solutions?
Add a new optional field device_config of type object to the Device Object. This field contains configuration used to define the device, separate from mount_config which is used to mount it.
Spec changes
Device Object:
| Response Field |
Type |
Description |
| volume_id* |
string |
ID of the shared volume to mount on every app instance. |
| mount_config |
object |
Configuration object to be passed to the driver when the volume is mounted. |
| device_config |
object |
**Configuration object to be passed to the driver when the device is created. ** |
Updated JSON example:
{
"volume_mounts": [{
"driver": "cephdriver",
"container_dir": "/data/images",
"mode": "r",
"device_type": "shared",
"device": {
"volume_id": "bc2c1eab-05b9-482d-b0cf-750ee07de311",
"device_config": {
"size_mb": 10240,
"fs_type": "ext4"
},
"mount_config": {
"key": "value"
}
}
}]
}
Semantics
device_config is an object, its schema is driver-specific, same as mount_config.
- The platform passes
device_config to the volume driver at device creation, and passes mount_config to the driver at mount.
- The change is backwards compatible. The field is optional.
Additional context
Volume services that create and mount devices on demand need a way to pass configuration separately from mount configuration.
What is the problem?
The Device Object in the Volume Mount Object currently only supports existing shared devices. It allows to pass
mount_config, which is used by the volume driver to mount volume.There is no mechanism for a service broker to provide configuration that driver can use to create a device on demand.
Who does this affect?
Volume service broker authors who need to create devices on-demand rather than using existing volumes.
Do you have any proposed solutions?
Add a new optional field
device_configof typeobjectto the Device Object. This field contains configuration used to define the device, separate frommount_configwhich is used to mount it.Spec changes
Device Object:
Updated JSON example:
{ "volume_mounts": [{ "driver": "cephdriver", "container_dir": "/data/images", "mode": "r", "device_type": "shared", "device": { "volume_id": "bc2c1eab-05b9-482d-b0cf-750ee07de311", "device_config": { "size_mb": 10240, "fs_type": "ext4" }, "mount_config": { "key": "value" } } }] }Semantics
device_configis an object, its schema is driver-specific, same asmount_config.device_configto the volume driver at device creation, and passesmount_configto the driver at mount.Additional context
Volume services that create and mount devices on demand need a way to pass configuration separately from mount configuration.