digitalocean/csi-digitalocean

Consider using separate structs for the Controller and Node parts

timoreimann opened this issue · 0 comments

Our Controller and Node plugin parts currently share the same underlying Driver struct. While this keeps things fairly straight forward, it also makes it harder to understand which pieces are used where and complicates reasoning about the code in general.

For instance, the set of godo interfaces are not required by the Node part at all, while the mounter is only needed by the Node part. Yet, both are available to the Controller and the Node parts.

We should consider creating separate structs (that embed a common struct as needed) and give each one just that the fields and methods that it needs.