`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:
co-authored by
Claude Opus 5.5
parent
584779945d
commit
f56eab28af
+9
-1
@@ -10,8 +10,16 @@
|
|||||||
- name: generate and store a runner registration token
|
- name: generate and store a runner registration token
|
||||||
when: runner_token_secret.resources | length == 0
|
when: runner_token_secret.resources | length == 0
|
||||||
block:
|
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
|
- 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
|
changed_when: false
|
||||||
|
|
||||||
- name: generate instance-level runner registration token
|
- name: generate instance-level runner registration token
|
||||||
|
|||||||
Reference in New Issue
Block a user