diff --git a/README.md b/README.md index dcb10ff..7879fc5 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/pkg/client/client.go b/pkg/client/client.go index 0c9a7c9..4d0f3e2 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -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