mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #57091 from humblec/volume-mode
Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add VolumeMode in GlusterFS PV spec. This ensures that GlusterFS pvs are file backed storage. Signed-off-by: Humble Chirammal <hchiramm@redhat.com> **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
commit
a28e708ec6
@ -704,10 +704,12 @@ func (p *glusterfsVolumeProvisioner) Provision() (*v1.PersistentVolume, error) {
|
||||
glog.Errorf("create volume error: %v.", err)
|
||||
return nil, fmt.Errorf("create volume error: %v", err)
|
||||
}
|
||||
mode := v1.PersistentVolumeFilesystem
|
||||
pv := new(v1.PersistentVolume)
|
||||
pv.Spec.PersistentVolumeSource.Glusterfs = glusterfs
|
||||
pv.Spec.PersistentVolumeReclaimPolicy = p.options.PersistentVolumeReclaimPolicy
|
||||
pv.Spec.AccessModes = p.options.PVC.Spec.AccessModes
|
||||
pv.Spec.VolumeMode = &mode
|
||||
if len(pv.Spec.AccessModes) == 0 {
|
||||
pv.Spec.AccessModes = p.plugin.GetAccessModes()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user