From c152570f6c42770db59bc20329a4f7f9ba02f845 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Sun, 30 Aug 2020 22:27:04 -0700 Subject: [PATCH] Add namespace to persistent volume path --- pkg/storage/storage_provisioner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/storage/storage_provisioner.go b/pkg/storage/storage_provisioner.go index 5f03066e2c..c0e815b022 100644 --- a/pkg/storage/storage_provisioner.go +++ b/pkg/storage/storage_provisioner.go @@ -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 }