Skip to content

Commit

Permalink
Merge pull request #9128 from tstromberg/pvc-directory
Browse files Browse the repository at this point in the history
Add namespace to persistent volume path
  • Loading branch information
tstromberg authored Sep 1, 2020
2 parents 9a68c90 + c152570 commit cf7484e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/storage_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit cf7484e

Please sign in to comment.