Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ReadWriteOncePod access mode #280

Open
kskalski opened this issue Nov 26, 2022 · 3 comments
Open

Support ReadWriteOncePod access mode #280

kskalski opened this issue Nov 26, 2022 · 3 comments
Labels
enhancement New feature or request Investigate

Comments

@kskalski
Copy link

Looks like the proper way to ensure single-pod access to volume is using a new ReadWriteOncePod access mode introduced here in Kubernetes 1.22

It would be nice to have this supported in local-path-provisioner

Now I'm getting this error:

The PersistentVolumeClaim "workdir-pvc-tmp" is invalid: spec.accessModes: 
Unsupported value: "ReadWriteOncePod": 
supported values: "ReadOnlyMany", "ReadWriteMany", "ReadWriteOnce"
@kerthcet
Copy link

+1, RWOP is graduating to Beta in v1.27 kubernetes/kubernetes#103132.

@derekbit
Copy link
Member

Thanks for the request. Will check how to achieve it in the current design.

@derekbit derekbit added Investigate enhancement New feature or request labels Dec 17, 2022
@chrishenzie
Copy link

chrishenzie commented Jan 30, 2023

Thanks for adding support for this!

It looks like this line will need updating to also include a check for ReadWriteOncePod:
https://github.com/rancher/local-path-provisioner/blob/v0.0.23/provisioner.go#L239

See this blog post for more context on enabling this feature in k8s. This section contains more details on adding support for CSI drivers, but it looks like this project may not apply?
https://kubernetes.io/blog/2021/09/13/read-write-once-pod-access-mode-alpha/#as-a-storage-vendor-how-do-i-add-support-for-this-access-mode-to-my-csi-driver

So long as you have the feature gate enabled in kube-apiserver, kube-scheduler, and kubelet, and use a version of this provisioner that supports the access mode it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Investigate
Projects
None yet
Development

No branches or pull requests

4 participants