Skip to content

Commit

Permalink
don't show Failed pods
Browse files Browse the repository at this point in the history
these are not alive, and Scope generally only shows the living, not
the dead.
  • Loading branch information
rade committed Apr 2, 2018
1 parent 27fb357 commit feae4f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion probe/kubernetes/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const (
)

// Pod states we handle specially
const StateDeleted = "deleted"
const (
StateDeleted = "deleted"
StateFailed = "Failed"
)

// Pod represents a Kubernetes pod
type Pod interface {
Expand Down
2 changes: 1 addition & 1 deletion render/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var PodRenderer = Memoise(ConditionalRenderer(renderKubernetesTopologies,
MakeFilter(
func(n report.Node) bool {
state, ok := n.Latest.Lookup(kubernetes.State)
return (!ok || state != kubernetes.StateDeleted)
return !ok || !(state == kubernetes.StateDeleted || state == kubernetes.StateFailed)
},
MakeReduce(
PropagateSingleMetrics(report.Container,
Expand Down

0 comments on commit feae4f4

Please sign in to comment.