Exclude pause containers when rendering k8s topologies

This commit is contained in:
Alfonso Acosta
2017-03-16 12:18:28 +00:00
parent 2fe3216e0a
commit 806b27e785

View File

@@ -114,6 +114,11 @@ func MapContainer2Pod(n report.Node, _ report.Networks) report.Nodes {
return report.Nodes{}
}
// Ignore pause containers
if image, ok := n.Latest.Lookup(docker.ImageName); ok && kubernetes.IsPauseImageName(image) {
return report.Nodes{}
}
// Otherwise, if some some reason the container doesn't have a pod uid (maybe
// slightly out of sync reports, or its not in a pod), make it part of unmanaged.
uid, ok := n.Latest.Lookup(docker.LabelPrefix + "io.kubernetes.pod.uid")