Merge pull request #3743 from weaveworks/more-pause

kubernetes: detect more 'pause' containers
This commit is contained in:
Bryan Boreham
2020-01-23 14:43:06 +00:00
committed by GitHub
3 changed files with 40 additions and 3 deletions

View File

@@ -245,6 +245,10 @@ func IsApplication(n report.Node) bool {
if _, ok := systemImagePrefixes[imagePrefix]; ok || report.IsPauseImageName(imagePrefix) {
return false
}
k8sContainerType, _ := n.Latest.Lookup(report.DockerLabelPrefix + "io.kubernetes.docker.type")
if k8sContainerType == "podsandbox" { // another way to detect "pause container"
return false
}
roleLabel, _ := n.Latest.Lookup(report.DockerLabelPrefix + "works.weave.role")
if roleLabel == "system" {
return false