Files
homelab/talos/talhelper/worker-rolling-reboot.sh

20 lines
498 B
Bash
Executable File

#!/bin/bash
declare -A WORKERS=(
["jungle-cruise"]="10.1.71.69"
)
for worker in "${!WORKERS[@]}"; do
ip="${WORKERS[$worker]}"
echo "Applying config to $worker ($ip)..."
talosctl apply-config --nodes ${ip} \
--file clusterconfig/fastpass-${worker}.yaml --mode=reboot
echo "Waiting for $worker to be Ready..."
kubectl wait --for=condition=Ready node/${worker} --timeout=10m
echo "$worker is back up. Sleeping 30s before next node..."
sleep 30
done
echo "All workers updated!"