Honor ReadOnly flag from persistent-volume plugin

This commit is contained in:
markturansky
2015-06-26 16:37:11 -04:00
parent 1367076d2e
commit 124bb22f92
8 changed files with 43 additions and 19 deletions

View File

@@ -78,7 +78,7 @@ func (plugin *persistentClaimPlugin) NewBuilder(spec *volume.Spec, pod *api.Pod,
return nil, err
}
builder, err := plugin.host.NewWrapperBuilder(volume.NewSpecFromPersistentVolume(pv), pod, opts, mounter)
builder, err := plugin.host.NewWrapperBuilder(volume.NewSpecFromPersistentVolume(pv, spec.ReadOnly), pod, opts, mounter)
if err != nil {
glog.Errorf("Error creating builder for claim: %+v\n", claim.Name)
return nil, err