Skip to content

Commit

Permalink
Do not show terminated pods
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed May 25, 2021
1 parent ec45f4f commit 28af029
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ istio-system 70m 2140m 14800m 570Mi 3641Mi 8934Mi
kube-system 82m 1831m 3222m 1312Mi 1203Mi 2365Mi
155m 4081m 20122m 1912Mi 4989Mi 12452Mi
```

## Known Issues

While init containers [play a role in resource allocation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#resources), they are not accounted for in this tool.
3 changes: 3 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ func Run(args *model.Args) error {
if err := runtime.DefaultUnstructuredConverter.FromUnstructured(info.Object.(*unstructured.Unstructured).Object, pm); err != nil {
return nil
}
if pm.Status.Phase == v1.PodSucceeded || pm.Status.Phase == v1.PodFailed {
return nil
}
responses = append(responses, fetchPod(pm))
}
return nil
Expand Down

0 comments on commit 28af029

Please sign in to comment.