talos/hack/test/e2e-capi.sh
Andrey Smirnov 1add26b42a chore: bump K8s to 1.19.4 in e2e scripts with CABPT version
This should fix the problem with the kubelet image.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-11-16 07:18:44 -08:00

42 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -eou pipefail
source ./hack/test/e2e.sh
export CABPT_VERSION="0.2.0-alpha.7"
export CACPPT_VERSION="0.1.0-alpha.8"
export CAPA_VERSION="0.5.4"
# We need to override this here since e2e.sh will set it to ${TMP}/capi/kubeconfig.
export KUBECONFIG="/tmp/e2e/docker/kubeconfig"
# CABPT
export CABPT_NS="cabpt-system"
# Install envsubst
apk add --no-cache gettext
# Env vars for cloud accounts
set +x
export GCP_B64ENCODED_CREDENTIALS=${GCE_SVC_ACCT}
export AWS_B64ENCODED_CREDENTIALS=${AWS_SVC_ACCT}
set -x
${CLUSTERCTL} init \
--control-plane "talos:v${CACPPT_VERSION}" \
--infrastructure "aws:v${CAPA_VERSION}" \
--bootstrap "talos:v${CABPT_VERSION}"
set +x
cat ${PWD}/hack/test/capi/components-capg.yaml| envsubst | ${KUBECTL} apply -f -
set -x
# Wait for the talosconfig
timeout=$(($(date +%s) + ${TIMEOUT}))
until ${KUBECTL} wait --timeout=1s --for=condition=Ready -n ${CABPT_NS} pods --all; do
[[ $(date +%s) -gt $timeout ]] && exit 1
echo 'Waiting to CABPT pod to be available...'
sleep 5
done