Merge pull request #95569 from oomichi/remove-kubelet-util

Move dirExists() to kubelet_test
This commit is contained in:
Kubernetes Prow Robot
2020-11-06 11:28:51 -08:00
committed by GitHub
3 changed files with 9 additions and 31 deletions

View File

@@ -2075,6 +2075,15 @@ func runVolumeManager(kubelet *Kubelet) chan struct{} {
return stopCh
}
// dirExists returns true if the path exists and represents a directory.
func dirExists(path string) bool {
s, err := os.Stat(path)
if err != nil {
return false
}
return s.IsDir()
}
// Sort pods by UID.
type podsByUID []*v1.Pod