#72 suppport client-side SSL certs from kubeconfig file

This commit is contained in:
Henning Jacobs
2017-01-15 18:15:17 +01:00
parent cb1332495f
commit e54a0fb5f5
3 changed files with 45 additions and 12 deletions

View File

@@ -48,6 +48,8 @@ def request(cluster, path, **kwargs):
if 'timeout' not in kwargs:
# sane default timeout
kwargs['timeout'] = 5
if cluster.cert_file and cluster.key_file:
kwargs['cert'] = (cluster.cert_file, cluster.key_file)
return session.get(urljoin(cluster.api_server_url, path), auth=cluster.auth, verify=cluster.ssl_ca_cert, **kwargs)