samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
120 stars 24 forks source link

Grouping shares of different pvcs #325

Open barrettMCW opened 10 months ago

barrettMCW commented 10 months ago

Howdy! I would like to be able to group smb shares with different pvcs, and I'm looking for my first time developing in an operator. I haven't really looked into the means quite yet, I figured I'd ask first if someone has already taken a shot at this and run into issues, or if it just hasn't been gotten to yet. Thanks!

barrettMCW commented 9 months ago

Did some digging! Looking at #297 It seems that the big hangup is that if an admin adds a pvc to given smb share group, the pod would need to be recreated and therefore cause an outage. Since adding PVCs at runtime is not an option, what if we used DFS? https://wiki.samba.org/index.php/Distributed_File_System_(DFS)

This way when a user add or removes a given smb share, the operator adds or removes the share then modifies the entry in the DFS root.

There is a couple implementation questions though. DFS as I understand it, pretty much just aggregates smb shares. A user connects to DFS, selects their share, then the client connects to that smb share under the hood. This leads to the only problem I see, which is that there needs to be a way to configure public endpoints.

We can modify the smb share crd to have some property that defines the public endpoint or it could make sense to create a new DFS crd.

Interested to hear your take! Thanks!