From f7ed8e9bd409fe05b9b51bf16ba0ca045aef9f91 Mon Sep 17 00:00:00 2001 From: zoidbergwill Date: Fri, 3 Apr 2020 17:41:15 +0200 Subject: [PATCH] Add option to skip verifying certs (#47) * Add option to skip verifying certs To work with self-signed certs https://github.com/hjacobs/pykube/issues/40 * Whoops Co-authored-by: Henning Jacobs --- pykube/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pykube/http.py b/pykube/http.py index 517a2db..4cce6ba 100644 --- a/pykube/http.py +++ b/pykube/http.py @@ -211,6 +211,7 @@ def __init__( config: KubeConfig, timeout: float = DEFAULT_HTTP_TIMEOUT, dry_run: bool = False, + verify: bool = True, http_adapter: Optional[requests.adapters.HTTPAdapter] = None, ): """ @@ -231,6 +232,7 @@ def __init__( session.mount("https://", http_adapter) session.mount("http://", http_adapter) self.session = session + self.session.verify = verify @property def url(self):