Merge pull request #117141 from dims/specify-kube-root-for-test-e2e-node/AWS

Specify kube root for test-e2e-node/aws to work
This commit is contained in:
Kubernetes Prow Robot 2023-04-11 20:21:59 -07:00 committed by GitHub
commit 162485fda3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,11 @@ import (
// GetK8sRootDir returns the root directory for kubernetes, if present in the gopath. // GetK8sRootDir returns the root directory for kubernetes, if present in the gopath.
func GetK8sRootDir() (string, error) { func GetK8sRootDir() (string, error) {
dir := os.Getenv("KUBE_ROOT")
if len(dir) > 0 {
return dir, nil
}
dir, err := RootDir() dir, err := RootDir()
if err != nil { if err != nil {
return "", err return "", err