linkerd2/controller/k8s
Alejandro Pedraza 4a84f2cb32
Implement the k8s metadata API in the Destination controller (#10326)
Fixes #9986

After reviewing the k8s API calls in Destination, it was concluded we
could only swap out the calls to the Node and RS resources to use the
metadata API, as all the other resources (Endpoints, EndpointSlices,
Services, Pod, ServiceProfiles, Server) required fields other than those
found in their metadata section.

This also required completing the `NewFakeAPI` implementation by adding
the missing annotations and labels entries.

## Testing Memory Consumption

The gains here aren't as big as in #9650. In order to test this we need
to push hard and create 4000 RS:

``` bash
for i in {0..4000}; do kubectl create deployment test-pod-$i --image=nginx; done
```

In edge-23.2.1 the destination pod's memory consumption goes from 40Mi
to 160Mi after all the RS were created. With this change, it went from
37Mi to 140Mi.
2023-02-13 17:30:07 -05:00
..
api.go Use metadata API in the proxy and tap injectors (#9650) 2022-11-16 09:21:39 -05:00
api_resource.go Use metadata API in the proxy and tap injectors (#9650) 2022-11-16 09:21:39 -05:00
api_test.go Use metadata API in the proxy and tap injectors (#9650) 2022-11-16 09:21:39 -05:00
clientset.go smi: remove default functionality in linkerd (#7334) 2021-12-03 12:07:30 +05:30
k8s.go Use metadata API in the proxy and tap injectors (#9650) 2022-11-16 09:21:39 -05:00
metadata_api.go Use metadata API in the proxy and tap injectors (#9650) 2022-11-16 09:21:39 -05:00
prometheus.go Use metadata API in the proxy and tap injectors (#9650) 2022-11-16 09:21:39 -05:00
test_helper.go Implement the k8s metadata API in the Destination controller (#10326) 2023-02-13 17:30:07 -05:00