Poll for gitea rollout instead of using rollout status
Demo / hello (push) Successful in 20s

`kubectl rollout status` fails immediately once a rollout has exceeded
its progress deadline, even if the new pod is about to become ready.
Poll the deployment until replicas, updated and available counts agree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-06 13:31:04 -05:00
co-authored by Claude Opus 5.5
parent 584779945d
commit f56eab28af
+9 -1
View File
@@ -10,8 +10,16 @@
- name: generate and store a runner registration token
when: runner_token_secret.resources | length == 0
block:
# Poll instead of `kubectl rollout status`, which exits immediately once
# a slow rollout has passed the deployment's progressDeadlineSeconds.
- name: wait for the gitea deployment to finish rolling out
command: kubectl -n gitea rollout status deployment/gitea --timeout=600s
command: >-
kubectl -n gitea get deployment gitea
-o jsonpath={.spec.replicas},{.status.replicas},{.status.updatedReplicas},{.status.availableReplicas}
register: gitea_rollout
until: gitea_rollout.stdout.split(',') | unique | length == 1
retries: 90
delay: 10
changed_when: false
- name: generate instance-level runner registration token