Hello,
I'm implementing a CSI driver and have a problem with access modes. For example in GKE, I can define a Volume Claim (PVC) supporting both MULTI_NODE_READER_ONLY (ReadOnlyMany) and SINGLE_NODE_WRITER (ReadWriteOnce). If I create a single Workload (pod, or ReplicaSet with just one replica), the Volume is mounted RW, but when there are more Workloads (replicas spread on multiple nodes), it is RO. I thought it is the CO that decides which Access Mode to use, however, when I try to do the same with my driver, I always get the first mode specified in the yaml I used to provision the Volume (PVC). Do I miss something?
If I add PUBLISH_UNPUBLISH_VOLUME Controller Capability, I also get an error from External Attacher: "AttachVolume.Attach failed for volume [...] : CSI does not support ReadOnlyMany and ReadWriteOnce on the same PersistentVolume". It suggests that CSI does not support multiple access modes at all, but, as far as I know, GKE also uses CSI (GCE-PD)...
Currently I'm using v0.3.0 spec and on-premises Kubernetes 1.13 (RKE).
Regards,
Piotr