Commit 0354a902 authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #29328 from pmorie/kubelet-move

Automatic merge from submit-queue Extract kubelet node status into separate file Extract kubelet node status management into a separate file as a continuation of the kubelet code simplification effort.
parents 2f545e1f 249da773
......@@ -18,6 +18,7 @@ package kubelet
import (
"fmt"
"os"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/capabilities"
......@@ -118,3 +119,12 @@ func allowHostIPC(pod *api.Pod) (bool, error) {
}
return false, nil
}
// 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()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment