Skip to content

Commit

Permalink
Delete CreateContainerConfigError pods
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jan 10, 2025
1 parent 97156be commit 780ed98
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions artifacts/k8s_galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,15 @@
command: helm install --create-namespace -n {{ NAMESPACE }} galaxy galaxy/galaxy --timeout 10m -f /opt/galaxy_values.yaml --version 5.17.0
environment:
KUBECONFIG: /etc/kubernetes/admin.conf

- name: Wait pods to be ready
pause:
minutes: 5

- 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

Check failure on line 193 in artifacts/k8s_galaxy.yml

View workflow job for this annotation

GitHub Actions / test-artifacts

yaml[new-line-at-end-of-file]

No new line character at the end of file

0 comments on commit 780ed98

Please sign in to comment.