IsReadOnly bool on builder
This commit is contained in:
@@ -99,7 +99,7 @@ func (plugin *glusterfsPlugin) newBuilderInternal(spec *volume.Spec, ep *api.End
|
||||
},
|
||||
hosts: ep,
|
||||
path: source.Path,
|
||||
readonly: readOnly,
|
||||
readOnly: readOnly,
|
||||
exe: exe}, nil
|
||||
}
|
||||
|
||||
@@ -128,7 +128,8 @@ type glusterfsBuilder struct {
|
||||
*glusterfs
|
||||
hosts *api.Endpoints
|
||||
path string
|
||||
readonly bool
|
||||
readOnly bool
|
||||
mounter mount.Interface
|
||||
exe exec.Interface
|
||||
}
|
||||
|
||||
@@ -161,6 +162,10 @@ func (b *glusterfsBuilder) SetUpAt(dir string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (glusterfsVolume *glusterfs) IsReadOnly() bool {
|
||||
return glusterfsVolume.readOnly
|
||||
}
|
||||
|
||||
func (glusterfsVolume *glusterfs) GetPath() string {
|
||||
name := glusterfsPluginName
|
||||
return glusterfsVolume.plugin.host.GetPodVolumeDir(glusterfsVolume.pod.UID, util.EscapeQualifiedNameForDisk(name), glusterfsVolume.volName)
|
||||
@@ -212,7 +217,7 @@ func (b *glusterfsBuilder) setUpAtInternal(dir string) error {
|
||||
var errs error
|
||||
|
||||
options := []string{}
|
||||
if b.readonly {
|
||||
if glusterfsVolume.readOnly {
|
||||
options = append(options, "ro")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user