mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
namespace fro glusterfs
This commit is contained in:
parent
dc6ac4e29e
commit
6c65b247a3
@ -1117,6 +1117,9 @@ func (ctrl *ProvisionController) persistentVolumeForGrdata() (*v1.PersistentVolu
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("find pv for grdata: %v", err)
|
||||
}
|
||||
if pv.Spec.PersistentVolumeSource.Glusterfs != nil && pv.Spec.PersistentVolumeSource.Glusterfs.EndpointsNamespace == nil {
|
||||
pv.Spec.PersistentVolumeSource.Glusterfs.EndpointsNamespace = &pv.Spec.ClaimRef.Namespace
|
||||
}
|
||||
return pv, nil
|
||||
}
|
||||
|
||||
|
@ -166,8 +166,12 @@ func updatePathForPersistentVolumeSource(persistentVolumeSource *v1.PersistentVo
|
||||
//glusterfs:
|
||||
// endpoints: glusterfs-cluster
|
||||
// path: myVol1
|
||||
source.Glusterfs.Path = persistentVolumeSource.Glusterfs.Path
|
||||
source.Glusterfs.Path = newPath(persistentVolumeSource.Glusterfs.Path)
|
||||
glusterfs := &v1.GlusterfsPersistentVolumeSource{
|
||||
EndpointsName: persistentVolumeSource.Glusterfs.EndpointsName,
|
||||
EndpointsNamespace: persistentVolumeSource.Glusterfs.EndpointsNamespace,
|
||||
Path: newPath(persistentVolumeSource.Glusterfs.Path),
|
||||
}
|
||||
source.Glusterfs = glusterfs
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported persistence volume source")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user