Merge pull request #9128 from tstromberg/pvc-directory
Add namespace to persistent volume pathpull/9109/head
commit
cf7484ed59
|
@ -56,8 +56,8 @@ var _ controller.Provisioner = &hostPathProvisioner{}
|
||||||
|
|
||||||
// Provision creates a storage asset and returns a PV object representing it.
|
// Provision creates a storage asset and returns a PV object representing it.
|
||||||
func (p *hostPathProvisioner) Provision(options controller.ProvisionOptions) (*core.PersistentVolume, error) {
|
func (p *hostPathProvisioner) Provision(options controller.ProvisionOptions) (*core.PersistentVolume, error) {
|
||||||
glog.Infof("Provisioning volume %v", options)
|
path := path.Join(p.pvDir, options.PVC.Namespace, options.PVC.Name)
|
||||||
path := path.Join(p.pvDir, options.PVC.Name)
|
glog.Infof("Provisioning volume %v to %s", options, path)
|
||||||
if err := os.MkdirAll(path, 0777); err != nil {
|
if err := os.MkdirAll(path, 0777); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue