Run channels on upgrade e2e tests to verify addons are being applied

This commit is contained in:
Ole Markus With 2022-06-09 16:57:05 +02:00
parent b46d3442ec
commit 012cec822e
2 changed files with 14 additions and 0 deletions

View File

@ -42,6 +42,7 @@ fi
export KOPS_BASE_URL
export KOPS
export CHANNELS
export KOPS_FEATURE_FLAGS="SpecOverrideFlag"
export KOPS_RUN_TOO_NEW_VERSION=1
@ -91,6 +92,14 @@ function kops-download-from-base() {
echo "${kops}"
}
function kops-channels-download-from-base() {
local channels
channels=$(mktemp -t channels.XXXXXXXXX)
wget -qO "${channels}" "$KOPS_BASE_URL/$(go env GOOS)/$(go env GOARCH)/channels"
chmod +x "${channels}"
echo "${channels}"
}
function kops-base-from-marker() {
if [[ "${1}" =~ ^https: ]]; then
echo "${1}"
@ -106,12 +115,14 @@ function kops-acquire-latest() {
if [[ "${JOB_TYPE-}" == "periodic" ]]; then
KOPS_BASE_URL="$(curl -s https://storage.googleapis.com/kops-ci/bin/latest-ci-updown-green.txt)"
KOPS=$(kops-download-from-base)
CHANNELS=$(kops-channels-download-from-base)
else
if [[ -n "${KOPS_BASE_URL-}" ]]; then
KOPS_BASE_URL=""
fi
$KUBETEST2 --build
KOPS="${REPO_ROOT}/.build/dist/linux/amd64/kops"
CHANNELS="${REPO_ROOT}/.build/dist/linux/amd64/channels"
KOPS_BASE_URL=$(cat "${REPO_ROOT}/.kubetest2/kops-base-url")
export KOPS_BASE_URL
echo "KOPS_BASE_URL=$KOPS_BASE_URL"

View File

@ -41,6 +41,7 @@ else
KOPS_BASE_URL=$(kops-base-from-marker "${KOPS_VERSION_B}")
KOPS_BASE_URL_B="${KOPS_BASE_URL}"
KOPS_B=$(kops-download-from-base)
CHANNELS=$(kops-channels-download-from-base)
fi
${KUBETEST2} \
@ -92,6 +93,8 @@ kubectl get nodes -owide --kubeconfig "${KUBECONFIG_A}"
# Sleep to ensure channels has done its thing
sleep 60s
${CHANNELS} apply channel "$KOPS_STATE_STORE"/"${CLUSTER_NAME}"/addons/bootstrap-channel.yaml --yes -v4
"${KOPS_B}" rolling-update cluster
"${KOPS_B}" rolling-update cluster --yes --validation-timeout 30m