Skip to content

Commit

Permalink
metrics: Remove pod from the queue after deleting metrics
Browse files Browse the repository at this point in the history
This is done to prevent a memory leak in environments with a high pod churn or
very long-running Tetragon agents.

Credits to Tam Mach for fixing a similar issue in cilium/cilium#31714.

Signed-off-by: Anna Kapuscinska <anna@isovalent.com>
  • Loading branch information
lambdanis committed Apr 3, 2024
1 parent 91ec63f commit 86e210a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/metrics/metricwithpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@ func StartPodDeleteHandler() {
return
}
DeleteMetricsForPod(pod.(*corev1.Pod))
queue.Done(pod)
}
}

0 comments on commit 86e210a

Please sign in to comment.