mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
fix e2e.go args for kubectl
This commit is contained in:
parent
178d0af795
commit
4e1ab8045b
15
hack/e2e.go
15
hack/e2e.go
@ -216,13 +216,22 @@ func finishRunning(stepName string, cmd *exec.Cmd) bool {
|
||||
|
||||
// returns either "", or a list of args intended for appending with the
|
||||
// kubecfg or kubectl commands (begining with a space).
|
||||
func kubeClientArgs() string {
|
||||
func kubecfgArgs() string {
|
||||
if *checkVersionSkew {
|
||||
return " -expect_version_match"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// returns either "", or a list of args intended for appending with the
|
||||
// kubectl command (begining with a space).
|
||||
func kubectlArgs() string {
|
||||
if *checkVersionSkew {
|
||||
return " --match-server-version"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func bashWrap(cmd string) string {
|
||||
return `
|
||||
set -o errexit
|
||||
@ -233,8 +242,8 @@ export KUBE_CONFIG_FILE="config-test.sh"
|
||||
|
||||
# TODO(jbeda): This will break on usage if there is a space in
|
||||
# ${KUBE_ROOT}. Covert to an array? Or an exported function?
|
||||
export KUBECFG="` + *root + `/cluster/kubecfg.sh` + kubeClientArgs() + `"
|
||||
export KUBECTL="` + *root + `/cluster/kubectl.sh` + kubeClientArgs() + `"
|
||||
export KUBECFG="` + *root + `/cluster/kubecfg.sh` + kubecfgArgs() + `"
|
||||
export KUBECTL="` + *root + `/cluster/kubectl.sh` + kubectlArgs() + `"
|
||||
|
||||
source "` + *root + `/cluster/kube-env.sh"
|
||||
source "` + *root + `/cluster/${KUBERNETES_PROVIDER}/util.sh"
|
||||
|
Loading…
Reference in New Issue
Block a user