Skip to content

Commit cbb7f21

Browse files
committed
Tighten k8s pause container name check
Pod sandbox containers _start_ with `k8s_POD`.
1 parent c57f670 commit cbb7f21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

userspace/libsinsp/container_engine/docker_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ bool docker::parse_docker(sinsp_container_manager* manager, sinsp_container_info
163163
}
164164

165165
container->m_name = root["Name"].asString();
166-
if(container->m_name.find("k8s_POD") != std::string::npos)
166+
if(container->m_name.find("k8s_POD") == 0)
167167
{
168168
container->m_is_pod_sandbox = true;
169169
}

0 commit comments

Comments
 (0)