diff --git a/kopf/_cogs/clients/auth.py b/kopf/_cogs/clients/auth.py index e5c13a44..4cd3eaab 100644 --- a/kopf/_cogs/clients/auth.py +++ b/kopf/_cogs/clients/auth.py @@ -10,6 +10,7 @@ from kopf._cogs.clients import errors from kopf._cogs.helpers import versions +from kopf._cogs.configs import configuration from kopf._cogs.structs import credentials # Per-operator storage and exchange point for authentication methods. @@ -101,6 +102,8 @@ def __init__( certificate_path: Optional[str] private_key_path: Optional[str] + settings = configuration.OperatorSettings() + if info.ca_path and info.ca_data: raise credentials.LoginError("Both CA path & data are set. Need only one.") elif info.ca_path: @@ -172,6 +175,11 @@ def __init__( ), headers=headers, auth=auth, + timeout=aiohttp.ClientTimeout( + total=settings.networking.request_timeout, + sock_connect=settings.networking.connect_timeout, + ), + ) # Add the extra payload information. We avoid overriding the constructor.