Merge pull request #81204 from codenrhoden/rename-hu-pathexists

Rename HostUtils.ExistsPath to PathExists
This commit is contained in:
Kubernetes Prow Robot
2019-08-12 20:12:12 -07:00
committed by GitHub
11 changed files with 20 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ import (
"strings"
"sync"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
@@ -195,7 +195,7 @@ func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, h
volumePath := hostPath
hostPath = filepath.Join(volumePath, subPath)
if subPathExists, err := hu.ExistsPath(hostPath); err != nil {
if subPathExists, err := hu.PathExists(hostPath); err != nil {
klog.Errorf("Could not determine if subPath %s exists; will not attempt to change its permissions", hostPath)
} else if !subPathExists {
// Create the sub path now because if it's auto-created later when referenced, it may have an