Skip to content

Commit

Permalink
Fixed the k8 event text (#1319)
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshrvel authored Mar 4, 2024
1 parent 9c99a23 commit d85bb62
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/robusta/core/playbooks/pod_utils/crashloop_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ def get_crash_report_enrichments(
if container_status.state and container_status.state.terminated:
if container_status.state.terminated.startedAt:
crash_info_rows.append(["Crashing since", container_status.state.terminated.startedAt])
crash_info_rows.append(["TERMINATED", f"Reason: {container_status.state.terminated.reason}"])
crash_info_rows.append(["Status", "TERMINATED"])
crash_info_rows.append(["Reason", container_status.state.terminated.reason])

if container_status.state and container_status.state.waiting:
crash_info_rows.append(["WAITING", f"Reason: {container_status.state.waiting.reason}"])
crash_info_rows.append(["Status", "WAITING"])
crash_info_rows.append(["Reason", container_status.state.waiting.reason])

if container_status.lastState and container_status.lastState.terminated:
prev_container_rows.append(["TERMINATED", f"Reason: {container_status.lastState.terminated.reason}"])
prev_container_rows.append(["Status", "TERMINATED"])
prev_container_rows.append(["Reason", container_status.lastState.terminated.reason])
if container_status.lastState.terminated.startedAt:
prev_container_rows.append(["Started at", container_status.lastState.terminated.startedAt])
if container_status.lastState.terminated.finishedAt:
Expand Down

0 comments on commit d85bb62

Please sign in to comment.