gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.68k stars 1.77k forks source link

introduce webclient.ReusableClient #49296

Open hugoShaka opened 5 days ago

hugoShaka commented 5 days ago

This PR adds a reusable webclient for kube-agent-updater consumption.

As described in RFD-184, the updaters should now obtain update instructions by hitting /find.

The kube agent updater is a long-running updater and checks the proxy endpoint frequently. To avoid creating a new HTTP client every minute, this PR extracts a reusable web client, offering the same Find(), Ping(), and GetMOTD() functions than the webproxy package.

Goal (internal): https://github.com/gravitational/cloud/issues/10289