Summary
The current controllers (in internal/controllers package) of the ceph-provider have become complicated over time.
Main reason for this is that the API types (Image and Snapshot) do not strictly represent RBD images and snapshots (e.g. snapshots also maintain os-images in ceph under the hood), making the controller code complex with various interactions with ceph.
To allow for simplification of the controller code, we propose to add a new API type Volume. Incoming IRI Volumes will be translated directly to this new Volume type. A new volume controller will manage Image and Snapshot resources based on the volume type (data volume, OS base image, VM image, volume restored from snapshot). The image and snapshot controllers can then focus on the low-level management of RBD images and snapshots, while the volume controller handles high-level resource management without interacting with ceph directly.
Basic example
🚧 TODO
Motivation
Adjusting controller code in the current state is complicated and error-prone. Also, reviews are difficulr and take a long time. It is hard to understand changes to the controller behavior without manual tests.
Simplifying the current architecture should ease future development and make the code easier to understand and debug.
Summary
The current controllers (in
internal/controllerspackage) of the ceph-provider have become complicated over time.Main reason for this is that the API types (
ImageandSnapshot) do not strictly represent RBD images and snapshots (e.g. snapshots also maintain os-images in ceph under the hood), making the controller code complex with various interactions with ceph.To allow for simplification of the controller code, we propose to add a new API type
Volume. Incoming IRI Volumes will be translated directly to this newVolumetype. A new volume controller will manageImageandSnapshotresources based on the volume type (data volume, OS base image, VM image, volume restored from snapshot). The image and snapshot controllers can then focus on the low-level management of RBD images and snapshots, while the volume controller handles high-level resource management without interacting with ceph directly.Basic example
Motivation
Adjusting controller code in the current state is complicated and error-prone. Also, reviews are difficulr and take a long time. It is hard to understand changes to the controller behavior without manual tests.
Simplifying the current architecture should ease future development and make the code easier to understand and debug.