Skip to content

Commit

Permalink
Merge pull request #235 from grycap/devel
Browse files Browse the repository at this point in the history
Remove stuck pods
  • Loading branch information
micafer authored Jan 16, 2025
2 parents d4aaf70 + 86a2f70 commit 648b342
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions artifacts/k8s_galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,14 @@
command: kubectl -n {{ NAMESPACE }} wait --for=condition=Available deployment/galaxy-web --timeout=300s
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
ignore_errors: yes

Check failure on line 187 in artifacts/k8s_galaxy.yml

View workflow job for this annotation

GitHub Actions / test-artifacts

yaml[truthy]

Truthy value should be one of [false, true]

- name: Delete Pending stuck pods (CreateContainerConfigError)
shell: kubectl get pods -n {{ NAMESPACE }} -o jsonpath='{range .items[?(@.status.containerStatuses[0].state.waiting.reason=="CreateContainerConfigError")]}{.metadata.namespace} {.metadata.name}{"\n"}{end}' | xargs -r -n2 sh -c 'kubectl delete pod $1 -n $0'
register: error_pods
changed_when: error_pods.stdout_lines | length > 1
retries: 5
delay: 120
until: error_pods.stdout_lines | length < 1
environment:
KUBECONFIG: /etc/kubernetes/admin.conf

0 comments on commit 648b342

Please sign in to comment.