mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
nfs: add support for clients
in the StorageClass
The clients parameter in the storage class is used to limit access to the export to the set of hostnames, networks or ip addresses specified. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
a7d259a334
commit
254699cb1a
@ -132,6 +132,7 @@ func (nv *NFSVolume) CreateExport(backend *csi.Volume) error {
|
||||
nfsCluster := backend.VolumeContext["nfsCluster"]
|
||||
path := backend.VolumeContext["subvolumePath"]
|
||||
secTypes := backend.VolumeContext["secTypes"]
|
||||
clients := backend.VolumeContext["clients"]
|
||||
|
||||
err := nv.setNFSCluster(nfsCluster)
|
||||
if err != nil {
|
||||
@ -157,6 +158,10 @@ func (nv *NFSVolume) CreateExport(backend *csi.Volume) error {
|
||||
}
|
||||
}
|
||||
|
||||
if clients != "" {
|
||||
export.ClientAddr = strings.Split(clients, ",")
|
||||
}
|
||||
|
||||
_, err = nfsa.CreateCephFSExport(export)
|
||||
switch {
|
||||
case err == nil:
|
||||
|
Reference in New Issue
Block a user