fix: reduce rerun bootstrap pre-pull delays
This commit is contained in:
@@ -195,36 +195,6 @@ jobs:
|
||||
PRIMARY_IP=$(terraform output -raw primary_control_plane_ip)
|
||||
sed -i "s#https://k8s-cluster-cp-1\.[^:]*:6443#https://${PRIMARY_IP}:6443#g" ../outputs/kubeconfig
|
||||
|
||||
- name: Pre-pull Flux controller images on primary control plane
|
||||
working-directory: terraform
|
||||
run: |
|
||||
set -euo pipefail
|
||||
PRIMARY_IP=$(terraform output -raw primary_control_plane_ip)
|
||||
ssh -o StrictHostKeyChecking=no "ubuntu@${PRIMARY_IP}" 'bash -s' <<'EOF'
|
||||
set -euo pipefail
|
||||
images=(
|
||||
ghcr.io/fluxcd/source-controller:v1.8.0
|
||||
ghcr.io/fluxcd/kustomize-controller:v1.8.1
|
||||
ghcr.io/fluxcd/helm-controller:v1.5.1
|
||||
ghcr.io/fluxcd/notification-controller:v1.8.1
|
||||
)
|
||||
|
||||
for image in "${images[@]}"; do
|
||||
for attempt in $(seq 1 12); do
|
||||
if timeout 180s sudo /usr/local/bin/ctr -n k8s.io images pull "${image}"; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [ "${attempt}" -eq 12 ]; then
|
||||
echo "Failed to pre-pull ${image} after ${attempt} attempts" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 20
|
||||
done
|
||||
done
|
||||
EOF
|
||||
|
||||
- name: Bootstrap Flux source and reconciliation graph
|
||||
env:
|
||||
KUBECONFIG: outputs/kubeconfig
|
||||
|
||||
Reference in New Issue
Block a user