Skip to content

Commit

Permalink
revert to fix properly later
Browse files Browse the repository at this point in the history
  • Loading branch information
Caio Begotti committed Feb 5, 2020
1 parent 5ba464a commit bfe22ea
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ func (pd *PodRestartsPlugin) findPodByPodName(namespace string) error {
containersCount := containerStatuses.RestartCount
if containersCount != int32(0) {
if listContainers {
if listThreshold != int32(0) {
if totalRestarts > listThreshold {
tbl.AddRow(pod.GetNamespace(), containersCount, pod.GetName()+"/"+containerStatuses.Name, pod.Status.StartTime)
}
}
tbl.AddRow(pod.GetNamespace(), containersCount, pod.GetName()+"/"+containerStatuses.Name, pod.Status.StartTime)
}
totalRestarts += containersCount
}
Expand All @@ -77,11 +73,7 @@ func (pd *PodRestartsPlugin) findPodByPodName(namespace string) error {
initContainersCount := initContainerStatuses.RestartCount
if initContainersCount != int32(0) {
if listContainers {
if listThreshold != int32(0) {
if totalRestarts > listThreshold {
tbl.AddRow(pod.GetNamespace(), initContainersCount, pod.GetName()+"/"+initContainerStatuses.Name, pod.Status.StartTime)
}
}
tbl.AddRow(pod.GetNamespace(), initContainersCount, pod.GetName()+"/"+initContainerStatuses.Name, pod.Status.StartTime)
}
totalRestarts += initContainersCount
}
Expand Down

0 comments on commit bfe22ea

Please sign in to comment.