Merge pull request #12008 from johngmyers/upgrade-old

Accommodate older destination kops versions in upgrade-ab scenario
This commit is contained in:
Kubernetes Prow Robot 2021-07-17 15:40:51 -07:00 committed by GitHub
commit aad209df8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,11 @@ KOPS_B=$(kops-download-from-base)
KOPS="${KOPS_B}"
"${KOPS_B}" edit cluster "${CLUSTER_NAME}" "--set=cluster.spec.kubernetesVersion=${K8S_VERSION_B}"
if [[ "${KOPS_B}" =~ v1.2[01] ]]; then
"${KOPS_B}" set cluster "${CLUSTER_NAME}" "cluster.spec.kubernetesVersion=${K8S_VERSION_B}"
else
"${KOPS_B}" edit cluster "${CLUSTER_NAME}" "--set=cluster.spec.kubernetesVersion=${K8S_VERSION_B}"
fi
"${KOPS_B}" update cluster
"${KOPS_B}" update cluster --admin --yes