mirror of https://github.com/linkerd/linkerd2.git
Based on @adleong's suggestion in https://github.com/linkerd/linkerd2/pull/1434#pullrequestreview-145428857, this branch adds label hydration from destination IPs to the Tap server. This works the same as the label hydration for destination IPs added in #1434. However, it is only applied to the destination fields of events recorded by proxies in the inbound direction, since outbound destinations are already labeled with metadata provided by the Destination service. This means that when a user taps inbound traffic, the CLI will show k8s metadata labels for the destination peer (if it's available). This can be useful especially when tapping several pods at once, as it makes it easier to distinguish what pod received a request. This branch also refactors how the label hydration is performed, primarily to make adding it to the destination field less repetitive. Also, the `hydrateIPLabels` function now mutates the label map in the `TapEvent`, rather than returning a new map of labels, so that the case where no pod was found doesn't require an additional allocation of an empty map. Signed-off-by: Eliza Weisman <eliza@buoyant.io> |
||
---|---|---|
.. | ||
api | ||
ca | ||
cmd | ||
destination | ||
gen | ||
k8s | ||
script/destination-client | ||
tap | ||
Dockerfile |