wunderio / csi-rclone

CSI driver for rclone
Apache License 2.0
211 stars 62 forks source link

question - is it possible to specify the secret name ? #6

Open cameronbraid opened 4 years ago

cameronbraid commented 4 years ago

Hi,

I am wanting to use this csi driver to access more than one rclone backend, so ideally I would create a secret for each remote and then the PV can specify a secret to use.

Currently it looks like only 1 secret named 'rclone-secret' will be used. Is this correct ?

Would it be a hard change to support an additional field in the PersistentVolume spec to provide the name of the secret to use ?

cameronbraid commented 4 years ago

I think its fairly straightforward https://github.com/wunderio/csi-rclone/pull/7

Its not tested, but if you are interested in this PR I will do some testing

Jancis commented 4 years ago

It does look good, i started to need the same and was toying with the idea of having multiple storageclasses where csi-rclone would deploy all related instances based on storageclass and read the related secret, but your solution seems even better since it's fairly simple, has less overhead and does basically the same. Would be great if you can test it too, i see that it's falling back to original secret so there should be no migration path necessary.