Skip to content

Commit

Permalink
Remove stuck pods
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jan 16, 2025
1 parent 65f4a6e commit 86a2f70
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 86a2f70

Please sign in to comment.