mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +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
|
// returns either "", or a list of args intended for appending with the
|
||||||
// kubecfg or kubectl commands (begining with a space).
|
// kubecfg or kubectl commands (begining with a space).
|
||||||
func kubeClientArgs() string {
|
func kubecfgArgs() string {
|
||||||
if *checkVersionSkew {
|
if *checkVersionSkew {
|
||||||
return " -expect_version_match"
|
return " -expect_version_match"
|
||||||
}
|
}
|
||||||
return ""
|
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 {
|
func bashWrap(cmd string) string {
|
||||||
return `
|
return `
|
||||||
set -o errexit
|
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
|
# TODO(jbeda): This will break on usage if there is a space in
|
||||||
# ${KUBE_ROOT}. Covert to an array? Or an exported function?
|
# ${KUBE_ROOT}. Covert to an array? Or an exported function?
|
||||||
export KUBECFG="` + *root + `/cluster/kubecfg.sh` + kubeClientArgs() + `"
|
export KUBECFG="` + *root + `/cluster/kubecfg.sh` + kubecfgArgs() + `"
|
||||||
export KUBECTL="` + *root + `/cluster/kubectl.sh` + kubeClientArgs() + `"
|
export KUBECTL="` + *root + `/cluster/kubectl.sh` + kubectlArgs() + `"
|
||||||
|
|
||||||
source "` + *root + `/cluster/kube-env.sh"
|
source "` + *root + `/cluster/kube-env.sh"
|
||||||
source "` + *root + `/cluster/${KUBERNETES_PROVIDER}/util.sh"
|
source "` + *root + `/cluster/${KUBERNETES_PROVIDER}/util.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user