Skip to content

Commit f554ae2

Browse files
authored
fix: talosctl and talos image versions need to be in tandem to prevent generated config syntax errors (#1375)
1 parent 7ba5676 commit f554ae2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

scripts/hyperconverged-lab-talos.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ source "${SCRIPT_DIR}/lib/hyperconverged-common.sh"
3333

3434
export TALOS_VERSION="${TALOS_VERSION:-v1.11.5}"
3535
export TALOS_ARCH="${TALOS_ARCH:-amd64}"
36+
export TALOS_BINARY=talosctl-linux-${TALOS_ARCH}
3637
# Talos Factory schematic ID with iscsi-tools and util-linux-tools extensions for Longhorn
3738
# This schematic includes: siderolabs/iscsi-tools, siderolabs/util-linux-tools siderolabs/qemu-guest-agent
3839
export TALOS_SCHEMATIC_ID="${TALOS_SCHEMATIC_ID:-88d1f7a5c4f1d3aba7df787c448c1d3d008ed29cfb34af53fa0df4336a56040b}"
@@ -47,8 +48,9 @@ export JUMP_HOST_IMAGE="${JUMP_HOST_IMAGE:-Ubuntu 24.04}"
4748
#############################################################################
4849

4950
function installTalosctl() {
50-
echo "Installing talosctl..."
51-
curl -sL https://talos.dev/install | sh
51+
echo "Installing talosctl version ${TALOS_VERSION}..."
52+
wget https://github.com/siderolabs/talos/releases/download/${TALOS_VERSION}/${TALOS_BINARY} -O talosctl
53+
sudo install -o root -g root -m 0755 talosctl /usr/local/bin/talosctl
5254
}
5355

5456
function selectJumpHostFlavor() {
@@ -500,7 +502,8 @@ echo "Jump host is reachable at ${JUMP_HOST_VIP}"
500502
#############################################################################
501503

502504
echo "Installing prerequisites on jump host..."
503-
ssh -o ForwardAgent=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -t ${SSH_USERNAME}@${JUMP_HOST_VIP} <<'EOFPREREQ'
505+
ssh -o ForwardAgent=yes -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -t ${SSH_USERNAME}@${JUMP_HOST_VIP} \
506+
"TALOS_VERSION='${TALOS_VERSION}' TALOS_BINARY='${TALOS_BINARY}' bash -s" <<'EOFPREREQ'
504507
set -e
505508
# Wait for apt locks to be released
506509
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock >/dev/null 2>&1; do
@@ -523,8 +526,10 @@ fi
523526
524527
# Install talosctl
525528
if ! talosctl version --client 2>/dev/null; then
526-
echo "Installing talosctl..."
527-
curl -sL https://talos.dev/install | sh
529+
echo "Installing talosctl version ${TALOS_VERSION}..."
530+
wget https://github.com/siderolabs/talos/releases/download/${TALOS_VERSION}/${TALOS_BINARY} -q -O ${TALOS_BINARY}
531+
sudo install -o root -g root -m 0755 ${TALOS_BINARY} /usr/local/bin/talosctl
532+
rm ${TALOS_BINARY}
528533
fi
529534
530535
# Install kubectl

0 commit comments

Comments
 (0)