Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
Construct pv from storageclass with mountOptions by rbd and cephfs pr…
Browse files Browse the repository at this point in the history
…ovisioner

This PR adds mountOptions to PV, when provisioner constructs it from
storageclass.
  • Loading branch information
nak3 committed Aug 13, 2018
1 parent 2db4446 commit a85b11a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ceph/cephfs/cephfs-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (p *cephFSProvisioner) Provision(options controller.VolumeOptions) (*v1.Per
Spec: v1.PersistentVolumeSpec{
PersistentVolumeReclaimPolicy: options.PersistentVolumeReclaimPolicy,
AccessModes: options.PVC.Spec.AccessModes,
MountOptions: options.MountOptions,
Capacity: v1.ResourceList{
// Quotas are supported by the userspace client(ceph-fuse, libcephfs), or kernel client >= 4.17 but only on mimic clusters.
// In other cases capacity is meaningless here.
Expand Down
1 change: 1 addition & 0 deletions ceph/rbd/pkg/provision/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func (p *rbdProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
Spec: v1.PersistentVolumeSpec{
PersistentVolumeReclaimPolicy: options.PersistentVolumeReclaimPolicy,
AccessModes: options.PVC.Spec.AccessModes,
MountOptions: options.MountOptions,
Capacity: v1.ResourceList{
v1.ResourceName(v1.ResourceStorage): resource.MustParse(fmt.Sprintf("%dMi", sizeMB)),
},
Expand Down

0 comments on commit a85b11a

Please sign in to comment.