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