Skip to content

Commit

Permalink
read proxy config for cluster and add to openapi config
Browse files Browse the repository at this point in the history
  • Loading branch information
rolf-moz committed Nov 15, 2023
1 parent 36cfbe6 commit 71bb5fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubernetes/base/config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ def _load_cluster_info(self):
self.verify_ssl = not self._cluster['insecure-skip-tls-verify']
if 'tls-server-name' in self._cluster:
self.tls_server_name = self._cluster['tls-server-name']
if "proxy-url" in self._cluster:
self.proxy = self._cluster["proxy-url"]

def _set_config(self, client_configuration):
if 'token' in self.__dict__:
Expand All @@ -580,7 +582,7 @@ def _refresh_api_key(client_configuration):
self._set_config(client_configuration)
client_configuration.refresh_api_key_hook = _refresh_api_key
# copy these keys directly from self to configuration object
keys = ['host', 'ssl_ca_cert', 'cert_file', 'key_file', 'verify_ssl','tls_server_name']
keys = ['host', 'ssl_ca_cert', 'cert_file', 'key_file', 'verify_ssl','tls_server_name', 'proxy']
for key in keys:
if key in self.__dict__:
setattr(client_configuration, key, getattr(self, key))
Expand Down

0 comments on commit 71bb5fa

Please sign in to comment.