kubernetes-client / python-base

Apache License 2.0
70 stars 185 forks source link

Support request timeout in the dynamic client #284

Closed psontag closed 2 years ago

psontag commented 2 years ago

What is the feature and why do you need it: I would like to use the dynamic client to interact with the Kubernetes API. But at the moment it looks like it is not possible to configure a request timeout for it.

For the normal api client it is possible to configure a timeout via the _request_timeout parameter as can be seen here: https://github.com/kubernetes-client/python/blob/dd7417a0b889371b4a855f27ffffcfbfa09c2ad3/kubernetes/client/api_client.py#L305-L310

But when I looked at the request method of the dynamic client I saw that this option can not be passed to its api client https://github.com/kubernetes-client/python-base/blob/3815cdaca8857931a275460f68593b9f4cb78813/dynamic/client.py#L270-L283

Describe the solution you'd like to see:

I would like to pass the _request_timeout parameter as an extra kwargs to the request methods of the dynamic client so that it is then pass on to the actual api client.

If I missed anything please let me know otherwise I would go ahead and create a PR for this.

psontag commented 2 years ago

/assign

roycaihw commented 2 years ago

HI @philipp-sontag-by, thanks for sending the issue! This python-base repo has been merged into the main python repo, and is being archived. Would you mind sending the issue to the python repo?

psontag commented 2 years ago

Sure, closing this one in favour of https://github.com/kubernetes-client/python/issues/1726