don't show Failed pods

these are not alive, and Scope generally only shows the living, not
the dead.
This commit is contained in:
Matthias Radestock
2018-04-02 10:09:13 +01:00
parent 27fb3571e1
commit feae4f4fcf
2 changed files with 5 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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,