Skip to content

Commit

Permalink
Merge "Print warning when OOMKiller occured"
Browse files Browse the repository at this point in the history
  • Loading branch information
Microzuul CI authored and Gerrit Code Review committed Oct 31, 2024
2 parents 048ec40 + e0fa13f commit 119c3aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions roles/post/get-k8s-cluster-resources/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@
- pv
tags:
skip_ansible_lint

- name: Check if some pod was OOMKilled
ansible.builtin.shell: |
kubectl get events --all-namespaces --sort-by='.lastTimestamp' -A | grep -i oom | tee {{ output_dir }}/oomkilled.log
register: _oomkill_status
ignore_errors: true

- name: Print warning message when OOMKill occured
ansible.builtin.shell: |
echo -e "\n\n\n\nOOMKill occured!\n{{ _oomkill_status.stdout }}\n\n\n\n"
when: _oomkill_status.stdout | length > 0

0 comments on commit 119c3aa

Please sign in to comment.