fix: reduce rebuild wait bottlenecks
Deploy Cluster / Terraform (push) Successful in 33s
Deploy Cluster / Ansible (push) Failing after 47m21s

This commit is contained in:
2026-05-03 16:03:24 +00:00
parent 95e39306c5
commit ff542024d2
4 changed files with 22 additions and 7 deletions
+9 -2
View File
@@ -593,6 +593,7 @@ jobs:
- name: Wait for Rancher
env:
KUBECONFIG: outputs/kubeconfig
RANCHER_BOOTSTRAP_PASSWORD: ${{ secrets.RANCHER_BOOTSTRAP_PASSWORD }}
run: |
set -euo pipefail
wait_for_resource() {
@@ -815,6 +816,14 @@ jobs:
kubectl -n flux-system annotate externalsecret/rancher-bootstrap-password external-secrets.io/force-sync="${force_sync}" --overwrite || true
kubectl -n cattle-system annotate externalsecret/rancher-bootstrap-password external-secrets.io/force-sync="${force_sync}" --overwrite || true
if [ -n "${RANCHER_BOOTSTRAP_PASSWORD}" ]; then
for namespace in flux-system cattle-system; do
kubectl -n "${namespace}" create secret generic rancher-bootstrap-password \
--from-literal=bootstrapPassword="${RANCHER_BOOTSTRAP_PASSWORD}" \
--dry-run=client -o yaml | kubectl apply -f -
done
fi
if kubectl -n flux-system get secret/rancher-bootstrap-password >/dev/null 2>&1 \
&& kubectl -n cattle-system get secret/rancher-bootstrap-password >/dev/null 2>&1; then
return 0
@@ -846,8 +855,6 @@ jobs:
wait_for_resource cattle-system deployment/cattle-system-rancher 600
kubectl -n cattle-system rollout status deployment/cattle-system-rancher --timeout=900s
wait_for_resource cattle-system deployment/rancher-webhook 900
pull_image_on_matching_pod_nodes cattle-system app=rancher-webhook registry.rancher.com/rancher/rancher-webhook:v0.9.3 12 10
kubectl -n cattle-system rollout restart deployment/rancher-webhook
kubectl -n cattle-system rollout status deployment/rancher-webhook --timeout=900s
wait_for_resource cattle-system issuer/cattle-system-rancher 900
wait_for_resource cattle-system certificate/tls-rancher-ingress 900