ipfs-cluster / ipfs-operator

55 stars 17 forks source link

Persistent storage for the cluster? #80

Open leseb opened 2 years ago

leseb commented 2 years ago

Hi,

I have a few questions as I glanced through the code :)

  1. What is backing IpfsStorage and ClusterStorage? I saw "cluster-storage" but I'm not sure where it is coming from
  2. Will it be easier to pass v1.PersistentVolumeClaim to both IpfsStorage and ClusterStorage for more flexibility?

Thanks!

coryschwartz commented 2 years ago

Hi @leseb,

These values are used to create a VolumeClaimTemplates which will create a PersistentVolumeClaim for the each instance.

The PVC template is generated here: https://github.com/ipfs-cluster/ipfs-operator/blob/main/controllers/statefulset.go#L297

Currently, we're just asking for the size and using the default volume driver for the cluster. This is flexible in the sense that it's likely to successfully create a volume in any k8s installation, but you're right that there isn't much user configurability at the moment if they want to use a different CSI.

This is something we can look at in the future, espeically if there are users who want to use some other storage layer than what is available from their provider.

leseb commented 2 years ago

Hi @coryschwartz

As suspected indeed, the default SC will be used, thanks for the clarification. I believe flexibility will be a plus, thanks for considering this as a future enhancement :).