Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #126 from hjacobs/hide-failed-pods
Browse files Browse the repository at this point in the history
#125 hide failed pods after one hour (same as completed jobs)
  • Loading branch information
hjacobs authored Feb 19, 2017
2 parents 01da8ef + ce452d2 commit 9026075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kube_ops_view/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def query_kubernetes_cluster(cluster):
obj['deleted'] = parse_time(pod['metadata']['deletionTimestamp'])
for cont in pod['spec']['containers']:
obj['containers'].append(map_container(cont, pod))
if obj['phase'] == 'Succeeded':
if obj['phase'] in ('Succeeded', 'Failed'):
last_termination_time = 0
for container in obj['containers']:
termination_time = container.get('state', {}).get('terminated', {}).get('finishedAt', '')
Expand Down

0 comments on commit 9026075

Please sign in to comment.