Skip to content

Commit

Permalink
Merge pull request #11676 from olemarkus/e2e-ab-export-kubeconfig
Browse files Browse the repository at this point in the history
Explicitly set kubeconfig flag where we want to use it
  • Loading branch information
k8s-ci-robot authored Jun 3, 2021
2 parents 043d0a8 + cf8f991 commit ce8d499
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/e2e/scenarios/upgrade-ab/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ ${KUBETEST2} \

# Export kubeconfig-a
KUBECONFIG_A=$(mktemp -t kops.XXXXXXXXX)
# Note: --kubeconfig flag not in 1.18
KUBECONFIG="${KUBECONFIG_A}" "${KOPS_A}" export kubecfg --name "${CLUSTER_NAME}" --admin
"{KOPS_A}" export kubecfg --name "${CLUSTER_NAME}" --admin --kubeconfig "{KUBECONFIG_A}"

# Verify kubeconfig-a
KUBECONFIG="${KUBECONFIG_A}" kubectl get nodes -owide
kubectl get nodes -owide --kubeconfig="${KUBECONFIG_A}"

if [[ "${KOPS_VERSION_B}" == "source" ]]; then
export KOPS_BASE_URL
Expand All @@ -58,18 +57,20 @@ KOPS="${KOPS_B}"

sleep 300
# Verify kubeconfig-a still works
KUBECONFIG="${KUBECONFIG_A}" kubectl get nodes -owide
kubectl get nodes -owide --kubeconfig "${KUBECONFIG_A}"

"${KOPS_B}" rolling-update cluster
"${KOPS_B}" rolling-update cluster --yes --validation-timeout 30m

"${KOPS_B}" validate cluster

# Verify kubeconfig-a still works
KUBECONFIG="${KUBECONFIG_A}" kubectl get nodes -owide
kubectl get nodes -owide --kubeconfig="${KUBECONFIG_A}"

cp "${KOPS_B}" "${WORKSPACE}/kops"

"{KOPS_B}" export kubecfg --name "${CLUSTER_NAME}" --admin

${KUBETEST2} \
--cloud-provider="${CLOUD_PROVIDER}" \
--kops-binary-path="${KOPS}" \
Expand Down

0 comments on commit ce8d499

Please sign in to comment.