siderolabs / cluster-api-control-plane-provider-talos

A control plane provider for CAPI + Talos
Mozilla Public License 2.0
62 stars 20 forks source link

close Talos and Kubernetes clients #52

Closed smira closed 2 years ago

smira commented 3 years ago

The problem is that we're creating them every time we need them, but we never close them

Talos client is easy to close: just use .Close().

Kubernetes HTTP client is tricky, but there's a way we did that in Talos: https://github.com/talos-systems/talos/commit/6d13d2cf9243adce739673f1982cbc1f12252ef1#diff-c97ec8241004eb2d4bc81231071540f96e7ebb84c15ed128b44285912bd2138a

smira commented 2 years ago

I believe this is something important we should fix