mirror of https://github.com/linkerd/linkerd2.git
* Fix injector timeout under high load Fixes #3358 When retrieving a pod owner, we were hitting the k8s API directly because at injection time the informer might not have been informed about the existence of the parent object. Under a large number of injection requests this ended up in the k8s API requests being throttled, the proxy-injector getting blocked and the webhook requests timing out. Now we'll hit the shared informer first, and hit the k8s API only when the informer doesn't return anything. After a few injection requests for the same owner, the informer should have been updated. Testing: Scaling an emoji deployment to 1000 replicas, and after waiting for a couple of minutes: Before: ```bash # a portion of the pods doesn't get injected $ kubectl-n emojivoto get po | grep ./1 | wc -l 109 kubectl -n kube-system logs -f kube-apiserver-minikube | grep failing.*timeout .... (lots of errors) ``` After: ```bash # all the pods get injected $ kubectl -n emojivoto get po | grep ./1 | wc -l 0 kubectl -n kube-system logs -f kube-apiserver-minikube | grep failing.*timeout ``` |
||
---|---|---|
.. | ||
api.go | ||
api_test.go | ||
clientset.go | ||
test_helper.go |