On loaded clusters with small range of pod ip addresses, pods can reuse IP addresses in relatively short periods of times.
When that happens, it triggers a sort of "time of set - time of use" bug:
The sniffer detects traffic from a certain IP at a current time. The mapper would eventually get that report and try to resolve the IP address to a pod name, at that point the address could belong to a newer pod (but that shouldn't cause an issue because we check the creation time). or more seriously, the mapper would use a not yet updated cache and link the traffic to a pod that doesn't exist anymore.
This PR gets the hostname of the container responsible for the traffic at realtime (in addition to its IP address). The hostname should always be the same as the pod name, therefor the mapper uses it to verify it found the right pod.
Description
On loaded clusters with small range of pod ip addresses, pods can reuse IP addresses in relatively short periods of times. When that happens, it triggers a sort of "time of set - time of use" bug: The sniffer detects traffic from a certain IP at a current time. The mapper would eventually get that report and try to resolve the IP address to a pod name, at that point the address could belong to a newer pod (but that shouldn't cause an issue because we check the creation time). or more seriously, the mapper would use a not yet updated cache and link the traffic to a pod that doesn't exist anymore.
This PR gets the hostname of the container responsible for the traffic at realtime (in addition to its IP address). The hostname should always be the same as the pod name, therefor the mapper uses it to verify it found the right pod.
References
Testing
Checklist