mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
fix: k8s 支持网关
This commit is contained in:
@@ -22,7 +22,12 @@ class KubernetesClient:
|
||||
@property
|
||||
def api(self):
|
||||
configuration = client.Configuration()
|
||||
configuration.host = self.url
|
||||
scheme = urlparse(self.url).scheme
|
||||
if not self.server:
|
||||
host = self.url
|
||||
else:
|
||||
host = f'{scheme}://127.0.0.1:{self.server.local_bind_port}'
|
||||
configuration.host = host
|
||||
configuration.verify_ssl = False
|
||||
configuration.api_key = {"authorization": "Bearer " + self.token}
|
||||
c = api_client.ApiClient(configuration=configuration)
|
||||
|
Reference in New Issue
Block a user