mirror of
https://github.com/weaveworks/scope.git
synced 2026-08-23 22:36:24 +00:00
kubernetes: detect more 'pause' containers
Dockershim has added a label `io.kubernetes.docker.type` for at least four years, where the pause container is of type `podsandbox`. This should be more reliable than trying to keep up with everyone's name for the pause container.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user