coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.78k stars 172 forks source link

Update flexvolume plugin for k8s changes #254

Open sgotti opened 8 years ago

sgotti commented 8 years ago

In kubernetes/kubernetes#20262 a new attach/detach controller will be introduced and starting from this comment https://github.com/kubernetes/kubernetes/issues/20262#issuecomment-223254349 there're more details on how it works and the future of the flexvolume plugin executor.

It'll be changed so flexvolume plugins attach/detach/mount/unmount function will be tied to the attacher/detacher/mounter/unmounter interfaces. This means that the attach/detach function can be executed by any host while the mount/unmount function will be executed by the kubelet on the target host.

When the flexvolume changes (https://github.com/kubernetes/kubernetes/issues/20262) will land the torusblk flex implementation must be changed to move the attach/detach function inside the mount/unmount functions since the volume attachment/detachment have to be executed by the kubelet on the target host.

If you're ok I'll open a PR when the k8s changes (maybe in k8s 1.3) will land.

barakmich commented 8 years ago

@sgotti Good looking out. That plan sounds like it'll work just fine, both for 1.2 and 1.3; the more flexible we can be with regard to k8s the better.