Document if kubeclient / restclient is threadsafe or not
Would be nice to have a "Not threadsafe, use one kubeclient per Thread" or the opposite in the docs somewhere.
I suspect it is but don't know for sure.
- is rest-client thread-safe?
- is http gem thread-safe?
- I think the only Client mutation during use is lazy discovery. Is it safe?
- is Config thread-safe?
yeah, client mutation is not threadsafe, I already run into that one :D
I think we want it to become thread-safe. That's the only sane contract for a high-level library...
Do you know details on problems you saw? Should discovery take a mutex, or would that risk one slow request blocking everything? Should we let multiple parallel discovery requests to "race", but make sure the results are "committed atomically"? (I'd rather not, premature buggization...)
having an instance-mutex around discoveries should be cheap and make it threadsafe alternative would be to initialize it with 'threadsafe: true' and then just eager-discover