Dynamic NFS provisioner should not share the same directory between PVs #4982
Closed
Description
Is this a bug report or feature request?
- Bug Report
Deviation from expected behavior:
All PVs created by the dynamic NFS provisioner shares the same directory of the NFS export.
Expected behavior:
Every PV created by the provisioner should get a dedicated sub-directory within the share.
See also: #2062 (comment)
From: https://github.com/rook/rook/blob/master/pkg/operator/nfs/provisioner.go#L147
return &v1.NFSVolumeSource{
ReadOnly: false,
Server: nfsService.Spec.ClusterIP,
Path: "/" + export.PersistentVolumeClaim.ClaimName,
}, nil
I assume we need a PV-specific component afterexport.PersistentVolumeClaim.ClaimName
.
How to reproduce it (minimal and precise):
- Follow the NFS quick start guide
- Create two PVC with the new nfs storage class
- Place a file in one PV
- Observe that the file appears in the other PV
Environment:
- OS (e.g. from /etc/os-release): Ubuntu 18.04
- Kernel:
Linux k8s-0.edgy.vms.0l.de 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
- Cloud provider or hardware configuration: self-hosted KVM, 3 nodes, full HA
- Rook version:
v1.2.4
- Storage backend version: does not apply
- Kubernetes version:
v1.17.2
- Kubernetes cluster type: Rancher RKE