bookingcom / shipper

Kubernetes native multi-cluster canary or blue-green rollouts using Helm
Apache License 2.0
733 stars 39 forks source link

webhook: use listers instead of bare clients #214

Closed juliogreff closed 5 years ago

juliogreff commented 5 years ago

During some runs of our e2e tests, we found out that we were hitting timeouts when operating on objects due to the webhook taking too long to respond. Since the webhook does very little computational work, our first suspect is the use of the bare kubeapi client, which issues network requests.

That's a bit unnecessary, since we already have all the data in memory anyway, in our informers. So let's use those, or, more specifically, the listers they give us, so we don't do no network requests no more.