From 2f9cf727494d3a449d6e9b79e21ac6f556c16abc Mon Sep 17 00:00:00 2001 From: Mario Macias Date: Tue, 10 Sep 2024 17:09:21 +0200 Subject: [PATCH] Avoid that a Pod update removes the container metadata (#1156) --- pkg/internal/transform/kube/db.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/internal/transform/kube/db.go b/pkg/internal/transform/kube/db.go index 6c2306ed1..7c41e428f 100644 --- a/pkg/internal/transform/kube/db.go +++ b/pkg/internal/transform/kube/db.go @@ -198,14 +198,6 @@ func (id *Database) addPods(pod *kube.PodInfo) { func (id *Database) deletePods(pod *kube.PodInfo) { for _, ip := range pod.IPInfo.IPs { delete(id.podsByIP, ip) - for _, cid := range pod.ContainerIDs { - cnt, ok := id.containerIDs[cid] - delete(id.containerIDs, cid) - if ok { - delete(id.namespaces, cnt.PIDNamespace) - delete(id.fetchedPodsCache, cnt.PIDNamespace) - } - } } }