Adding a root filesystem override for kubelet mounter

This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
This commit is contained in:
Vishnu kannan
2016-10-26 12:57:00 -07:00
parent cee8645d36
commit e861a5761d
18 changed files with 3284 additions and 3191 deletions

View File

@@ -42,9 +42,10 @@ var resultsDir = flag.String("results-dir", "/tmp/", "Directory to scp test resu
var sshOptionsMap map[string]string
const (
archiveName = "e2e_node_test.tar.gz"
CNIRelease = "07a8a28637e97b22eb8dfe710eeae1344f69d16e"
CNIDirectory = "cni"
archiveName = "e2e_node_test.tar.gz"
CNIRelease = "07a8a28637e97b22eb8dfe710eeae1344f69d16e"
CNIDirectory = "cni"
mounterRootfsPath string = "/"
)
var CNIURL = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/network-plugins/cni-%s.tar.gz", CNIRelease)
@@ -263,7 +264,7 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
return "", false, fmt.Errorf("Issue detecting node's OS via node's /etc/os-release. Err: %v, Output:\n%s", err, output)
}
if strings.Contains(output, "ID=gci") {
glog.Infof("GCI node and GCI mounter both detected, modifying --experimental-mounter-path accordingly")
glog.Infof("GCI node and GCI mounter both detected, modifying --mounter-path & --experimental-mounter-rootfs-path accordingly")
// Note this implicitly requires the script to be where we expect in the tarball, so if that location changes the error
// here will tell us to update the remote test runner.
@@ -274,6 +275,7 @@ func RunRemote(archive string, host string, cleanup bool, junitFilePrefix string
return "", false, err
}
// Insert args at beginning of testArgs, so any values from command line take precedence
testArgs = fmt.Sprintf("--experimental-mounter-rootfs-path=%s ", mounterRootfsPath) + testArgs
testArgs = fmt.Sprintf("--experimental-mounter-path=%s ", mounterPath) + testArgs
}