未验证 提交 cf7484ed 编写于 作者: T Thomas Strömberg 提交者: GitHub

Merge pull request #9128 from tstromberg/pvc-directory

Add namespace to persistent volume path
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册