You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add proxy support to Kubernetes client configuration in get_client (#2291)
* Add proxy support to Kubernetes client configuration in get_client
This update modifies the get_client function to support
setting a proxy for the Kubernetes client configuration.
The client_configuration argument is introduced to allow
passing a client.Configuration object directly, and if not
provided, it defaults to creating a new configuration instance.
Additionally, if the HTTPS_PROXY or HTTP_PROXY environment
variables are set, the proxy is applied to the Kubernetes
client configuration.
This enhancement enables easier integration of Kubernetes
client setup when working behind a proxy.
Signed-off-by: Shahaf Bahar <[email protected]>
* Simplify docstring by removing redundant default value explanation
* Update proxy configuration logic and README documentation
* Simplify use_proxy docstring in get_client method
* Add support for enabling proxy with use_proxy flag
* Remove client_configuration from get_client and initialize only for proxy usage
Signed-off-by: Shahaf Bahar <[email protected]>
* Refactor proxy handling in get_client function
* Refactor docstring to clarify proxy behavior
* Simplify proxy configuration logic in get_client
* Improve error message for missing proxy configuration in get_client
* Remove redundant dot in README
* Remove unnecessary check for client_configuration in get_client
* Update README to clarify proxy enablement instructions
* Clarify proxy enablement in README
* Clarify use_proxy argument type in README
* Retrieve client_configuration from kwargs if provided
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Ensure environment variable overrides use_proxy
* Remove redundant proxy configuration log
* Preserve client_configuration from kwargs when setting proxy
* Update docstring to clarify proxy conf behavior with env var
* Refactor proxy configuration logic for clarity
* Update README with proxy enablement details
* Refactor client_configuration retrieval in get_client
* Refactor proxy configuration in get_client for improved clarity
* Refactor use_proxy argument in get_client to support None as default value
* Remove use_proxy argument from get_client and update README
* Ensure proxy settings are always applied when enabled
* Check for proxy conflicts in client_configuration and environment variable
* Add test to verify proxy conflict raises ValueError for mismatched proxy settings
* Refactor test for proxy conflict in get_client method
Signed-off-by: Shahaf Bahar <[email protected]>
* Refactor test for proxy conflict to use pytest.raises match exp
* Add test for proxy enabled without proxy env variables set
---------
Signed-off-by: Shahaf Bahar <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0 commit comments